We have created a UserControl. Inside user control we are creating an update panel. Inside the panel we are creating various controls such as TextBox, Button, DropDownList and ListBox and event associated with them buttonclick(),DropDown_selectedIndexChanged(),TextBox_TextChenged() etc. All the controls(including update panel) are created programatically using c#. To ajaxify the events we have used ScriptManager.
ScriptManager is added on OnInit function programatically like as shown:
ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
if (scriptManager == null)
{
scriptManager = new ScriptManager();
//scriptManager.EnablePartialRendering = true;
this.Controls.AddAt(0,scriptManager);
}
Every time after page load only one event get fired partial postback(which is desired) but after that no event gets fired .
All valid changes have already been done in web.config file for AJAX . Please suggest the possible cause and solution of the problem.