Last post Feb 19, 2010 06:28 AM by night_dog
Feb 18, 2010 02:40 AM|may215|LINK
I am trying to render control(ComboBox) programmatically, and i am getting error that tell me that i have to add ScriptManager to the page.
But, i did that, and still its not working:
override protected void OnInit( EventArgs e )
this.Load += new System.EventHandler( this.Page_Load );
Page.Init += delegate
if (ScriptManager.GetInstance(Page) != null) return;
var sMgr = new ScriptManager();
base.OnInit( e );
And the render control html is:
protected override void Render( System.Web.UI.HtmlTextWriter writer )
The RenderControl Function:
static public string RenderControl(Control ctrl)
var sb = new StringBuilder();
var tw = new StringWriter(sb);
var hw = new HtmlTextWriter(tw);
Feb 18, 2010 03:59 AM|0GiS0|LINK
Exactly, you need to add a ScriptManager for partial render.
It's something like this:
<asp:ScriptManager ID="ScriptManager1" runat="server">
ScriptManager manages ASP.NET AJAX script libraries and script files, partial-page rendering...
Hope this helps you.
Feb 18, 2010 04:23 AM|may215|LINK
As you can see in the code i mention above, i did include ScriptManager in the code.
So, what do i need?
Feb 19, 2010 06:28 AM|night_dog|LINK
Check this http://forums.asp.net/p/1039254/1777798.aspx