Hi Guys,
Can anyone plz help me to find the solution. Does no one has idea about it? Plz it needs an Urgent solution.
Thanks & Regards,
Rajak Shaik.
Hi Guys,
We found the solution for this. We prepare one custom control that which renders the Scriptfunction which is used to display the content. we place that Custom control with in the updatepanel itself. so that it can call the JSfunction at the time of Asynchronous postback onceagain.
Our Custom Control is like this:
publicclassInlineScript :Control{
protectedoverridevoid Render(HtmlTextWriter writer){
ScriptManager sm =ScriptManager.GetCurrent(Page);if (sm.IsInAsyncPostBack){
StringBuilder sb =newStringBuilder();
base.Render(newHtmlTextWriter(newStringWriter(sb)));string script = sb.ToString();
ScriptManager.RegisterClientScriptBlock(this,typeof(InlineScript), UniqueID, script,false);}
else{
base.Render(writer);}
}
}
--> It is called on to the form like this.
<asp:UpdatePanelID="UpdatePanel1"runat="server">
<ContentTemplate>
<uc1:PropertiesID="usrDestination"runat="server"PageUri="" ComponentTemplateUri=""Xslt=""ParentUri=""/>
<cc1:InlineScriptID="InlineScript1"runat="server">
<scripttype="text/javascript">
tabberAutomatic();
</script>
</cc1:InlineScript>
</ContentTemplate>
</asp:UpdatePanel>
Its working fine for us. I will be happy if this code helps anyone who is facing the same problem.
Thanks & Regards,
Rajak Shaik.
HI ,
Can you explain me whow you you included this tag in your aspx file?
<cc1:InlineScriptID="InlineScript1"runat="server">
<scripttype="text/javascript">
tabberAutomatic();
</script>
</cc1:InlineScript>
I am having <asp:placeholder> in my XSLT and I am trying to add a usercontrol dynamically to that holder from aspx file...(in page_load when placeholder is loaded). I cant see the design of the control, but it is loaded (from view source of page)
Please Answer.. thanks
No comments:
Post a Comment