I have a repeater in UpdatePanel, and in it is a linkbutton that needs to set some values in a hidden div (display none) and then call javascript method that would make that div visible.
I am using ScriptManager.RegisterStartupScript and it is calling js method but the problem is that the code behind code is overwritten - code behind code is setting values for some fields from database (in the hidden div) and after it appears the fields are empty. If i click on a different button in repeater in updatepanel the div appears with the values set for a previous click. (the customer demand is that they click on a record in repeater and they can change it in a modal dialog).
how can i get the javascript method to make the modal dialog appear with the proper values?
current code is something like this in oncommand event for a repeater linkbutton
...
txtName.Text = row.Name;
ScriptManager.RegisterStartupScript(this, typeof(string), "showEdit", "showModalPanel('pnEdit')", true);