Detailsview itemupdating newvalues

Here is my detailsview: I tried adding a label to my page and then once updated Name had been assigned the value of the textbox I tried assigning that value to the label and it printed out the old product name not the one in the textbox.

This will be solved when calling the Item Updating event.After setting the Details View’s Item Updating method, you will need to modify the SQL Data Source’s Update Command, Update Command Type, and Update Parameters.The legacy code in the SQL data source used a update statement with parameters. However it seems that if the value coming from the Details View is null for Field1 then e. Is there an easy way round this, i am putting the values of about 10 fields into one string variable, i want to avoid 10 if (e. = null) If you just want to avoid duplicated code, why not move it into another method?It's not so much code duplication i am tring to avoid as having to do a load of comparisons to see if a particular value is set or not. New Values("Some Field") to a function/method is that if Some Field is set to null in the Details Views control then rather than there being e.

Leave a Reply