Hi there!,
· I am having some problem in maintaining the view state of a web form. I have two forms. One is "master" form and another one is "popup "form.
· I have some text boxes and a data grid in the Master form. And I am loading the data grid in the master form with the values entered in the textboxes in the "pop up" form (by storing those values in a data table and storing it in a "Session variable").
· I have two image buttons in the data grid. One button is for deleting the corresponding row in the data grid. And another one is to open the pop up form with the details in the data grid row which was clicked.
· After showing the corresponding data grid row in the pop up form changes can be done and after when we click a button in the pop up form called "update" the details entered in the popup form should be populated in the data grid after deleting that corresponding row in the data grid. Every thing works fine.
· But when I click the delete icon the data grid row (in the master form) which was clicked is getting deleted but the values in the textboxes in the master form is also getting deleted.
· This the code I have written to redirect from the pop up form after deleting the corresponding row in the data table
If Request("type") = "D" Then
Call Deleterow(code)
ClientScript.RegisterClientScriptBlock(Me.GetType, "Key", "opener.document.forms['aspnetForm'].submit(); window.close();", True)
End If