Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Server Error in '/' Application.
The TargetControlID of 'defaultCalendarExtender' is not valid. The value cannot be null or empty.
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.InvalidOperationException: The TargetControlID of 'defaultCalendarExtender' is not valid. The value cannot be null or empty.

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:


C#
[InvalidOperationException: The TargetControlID of 'defaultCalendarExtender' is not valid. The value cannot be null or empty.]
   System.Web.UI.ExtenderControl.RegisterWithScriptManager() +250
   System.Web.UI.ExtenderControl.OnPreRender(EventArgs e) +45
   AjaxControlToolkit.ExtenderControlBase.OnPreRender(EventArgs e) +42
   System.Web.UI.Control.PreRenderRecursiveInternal() +83
   System.Web.UI.Control.PreRenderRecursiveInternal() +168
   System.Web.UI.Control.PreRenderRecursiveInternal() +168
   System.Web.UI.Control.PreRenderRecursiveInternal() +168
   System.Web.UI.Control.PreRenderRecursiveInternal() +168
   System.Web.UI.Control.PreRenderRecursiveInternal() +168
   System.Web.UI.Control.PreRenderRecursiveInternal() +168
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18055
Posted
Updated 23-Jan-14 0:28am
v2
Comments
anuradha.sardesai 23-Jan-14 6:25am    
Code where you get the error?
Member 15290328 15-Nov-21 6:05am    
should add Text box and id Of Textbox Should be written in CalendarExtender TargetControlid="Text1"....
Maarten Kools 23-Jan-14 6:29am    
Without code it's not really possible to tell you where exactly the error is. But the issue is that the ID property of the control you're using to fill in TargetControlID is not filled in.

TargetControlID is a property in Ajax Calender Extender.You have to give ID of a Textbox.It's must to use this property for this control.

Eg;
ASP.NET
<asp:textbox id="TextBox1" runat="server"></asp:textbox>
   <cc1:calendarextender id="CalendarExtender3"  runat="server" targetcontrolid="TextBox1">
   </cc1:calendarextender>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900