This project is read-only.

DatePicker Question

Sep 24, 2009 at 8:22 PM

I have placed a DatePicker control on a web form, but when I attempt to view in browser I get this error:

Server Error in '/' Application. 
Object reference not set to an instance of an object. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace: 
[NullReferenceException: Object reference not set to an instance of an object.]
   DNA.UI.ClientScriptManager.ReferenceIsExists(ScriptManager sm, ScriptReference scriptReference) +268
   DNA.UI.ClientScriptManager.AddCompositeScript(Control control, ScriptReference scriptReference) +49
   DNA.UI.ClientScriptManager.AddCompositeScript(Control control, String name, String assembly) +64
   DNA.UI.ClientScriptManager.RegisterJQueryScriptReferences(Control control, ScriptManager sm, JQueryAttribute jqueryAttr) +306
   DNA.UI.ClientScriptManager.RegisterJQueryScriptReferences(Control control) +220
   DNA.UI.ClientScriptManager.RegisterJQueryControl(Control control, IScriptBuilder builder) +49
   DNA.UI.JQuery.DatePicker.OnPreRender(EventArgs e) +2412
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842



All that I have is the DatePicker, with nothing set. I have all references set: DNA.dll, DNA.UI.jQuery.dll and jQuery.dll. What am I missing?

Sep 25, 2009 at 4:03 PM

I discovered that if I add an Ajax ScriptManager control to the page it works fine, but I'm curious why this is?

Oct 7, 2009 at 3:47 AM

All Ajax WebControl needs the ScriptManager , please lean more about the AJAX in