c# - check detail view null fields before inserting -
I am looking at detail in asp.net, from which I am going to put data to DB. Here I want to do any inquiry before joining. Field is zero or not and if not empty then do not insert in DB. I have tried the following code but it is not working
Protected Zero DetailsView1_ItemInserting (Object Sender, DetailsViewInsertEventArgs E) {string unit = (string) e.Values ["UNT_COD"]; If (unt == "") {e.Cancel = true; }} Through this code, I am not receiving my purpose. Plz helps someone know how to check me < P>
string unt = e.values ["UNT_COD"] + ""; If (unt == "") {e.Cancel = true; }
Comments
Post a Comment