Hello Friends
There are so many scenarios where entire Sharepoint 2007 application uses OOTB (out of the box) functionality but we need to develop some custom webparts which uses AJAX Functionality so rather than making changes in web.config and master pages for entire application , we can write the same thing in the webpart itself in its OnInit function.
protected override void OnInit(EventArgs e)
{
if (ScriptManager.GetCurrent(this.Page) == null)
{
scriptManager = new ScriptManager();
scriptManager.ID = “myScriptManager”;
scriptManager.EnablePartialRendering = true;
this.Page.Form.Controls.Add(scriptManager);
}
base.OnInit(e);
}
Thanks
Disha Shah