I had a web application, which was using Ajax. And I was using the Calendar Extender Control from the Ajax toolkit.
I was using a master page that references style sheets. Once I run the application, I got this message,
StackTrace:
at AjaxControlToolkit.ScriptObjectBuilder.RegisterCssReferences(Control control) in d:\hg\act\Server\AjaxControlToolkit\ExtenderBase\ScriptObjectBuilder.cs:line 303
at AjaxControlToolkit.ExtenderControlBase.OnLoad(EventArgs e) in d:\hg\act\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs:line 305
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I was searching for a solution for sometime and finally, found this solution. It was really a simple solution. All you need to do is,
1. Add a script manager
2. Add a javascript function
and finally everything works fine.
Solution :
Add the following for your page:
I was using a master page that references style sheets. Once I run the application, I got this message,
This page is missing a HtmlHead control which is required for the CSS stylesheet link that is being added. Please add <head runat="server" />.
at AjaxControlToolkit.ScriptObjectBuilder.RegisterCssReferences(Control control) in d:\hg\act\Server\AjaxControlToolkit\ExtenderBase\ScriptObjectBuilder.cs:line 303
at AjaxControlToolkit.ExtenderControlBase.OnLoad(EventArgs e) in d:\hg\act\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs:line 305
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I was searching for a solution for sometime and finally, found this solution. It was really a simple solution. All you need to do is,
1. Add a script manager
2. Add a javascript function
and finally everything works fine.
Solution :
Add the following for your page:
<asp:ScriptManagerID="ScriptManager1"runat="server">
</asp:ScriptManager>
// here make a function which calls automatically
<scriptlanguage="javascript">
function show()
{
document.write("<head runat='server'></head>");
}
</script>