Exception Details: System.Web.HttpException: DataBinding: 'DatePickerControl.DatePicker' does not contain a property with the name 'SelectedDate'.
Source Error:
Line 31: DataSource.InsertParameters.Add("UserId", UserGUID.ToString());
Line 32:
Line 33: DataSource.Insert(); //here is the error
This error appear when I hit "create user" button of the createuserwizard. I was thinking maybe I can't store the datepicker into my sqldatasource.
This is my html code:
<asp:SqlDataSource ID="InsertExtraInfo" runat="server" ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString1 %>"
InsertCommand="INSERT INTO [UserDetails] ([UserId], [CustName], [CustNum], [CustRole], [CustStatus], [PName], [PEmail], [PRole], [WedDate]) VALUES (@UserId, @CustName, @CustNum, @CustRole, @CustStatus, @PName, @PEmail, @PRole, @WedDate)"
ProviderName="<%$ ConnectionStrings:ASPNETDBConnectionString1.ProviderName %>">
<InsertParameters>
<asp:ControlParameter Name="CustName" Type="String" ControlID="CustName" PropertyName="Text" />
<asp:ControlParameter Name="CustNum" Type="String" ControlID="CustNum" PropertyName="Text" />
<asp:ControlParameter Name="CustRole" Type="String" ControlID="CustRole" PropertyName="Text" />
<asp:ControlParameter Name="CustStatus" Type="String" ControlID="CustStatus" PropertyName="Text" />
<asp:ControlParameter Name="PName" Type="String" ControlID="PName" PropertyName="Text" />
<asp:ControlParameter Name="PEmail" Type="String" ControlID="PEmail" PropertyName="Text" />
<asp:ControlParameter Name="PRole" Type="String" ControlID="PRole" PropertyName="Text" />
<asp:ControlParameter Name="WedDate" Type="DateTime" ControlID="WedDate" PropertyName="SelectedDate"/>
</InsertParameters>
</asp:SqlDataSource>
here is code for datapicker:
<td class="style1">
<cc1:DatePicker ID="WedDate" runat="server" CalendarDate=""
TextCssClass="" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator17" runat="server" ControlToValidate="WedDate"
ErrorMessage="Wedding date required"/>
</td>