Hello All, I have a user control whose structure is -
<updatepanel UpdateMode="Always">
<ContentTemplate>
<asp:FormView>
<EditItemTemplate>
<table>
<tr id='tr1'>
<td>
Textbox1
btn1
</td>
</tr>
<tr id='tr2'>
<td>
textbox2
</td>
</tr>
<table>
</EditItemTemplate>
</asp:FormView>
</ContentTemplate>
</updatepanel>
On page load I use following to hide tr2
ClientScriptManager cs = Page.ClientScript;
csText.AppendLine("");
csText.AppendLine("if(document.getElementById('tr2')!=null)
document.getElementById('tr2').style.display = 'none';");
csText.AppendLine("");
cs.RegisterStartupScript(this, this.GetType(), csName, csText.ToString(), false);
This part is working fine. Now on click of the btn1 I am popping up the modal popup extendar control. This causes the tr2 to show again. I know that the script needs to be inline with the updatePanel. I tried using ScriptManager.RegisterStartupScript(....); but does not work. Also the updateMode needs to be always so that the data from pop extendar can be put inside the Textbox1
All the help is appreciated. Thank you