Rank: Member Groups: Member
Joined: 11/18/2007 Posts: 18
|
DatePicker control:
Development environment: c#, asp.net 2.x, iis 6.0, visual studio pro 2005
This DatePicker control is working fine withing aspx page.
My enquiry relates to wanting to get the date value into something meaningful -- i.e. transfer value to a database record.
Currently I have a table created with a variable ManualDate -- set as 'smalldatetime' structure.
Via the aspx.cs page, I am using a stored procedure, to insert record via sql 2005 server.
scCommand.Parameters.AddWithValue("@ManualDate", DatePicker_ProspectCallBack);
The above code is not working, i.e. the DatePicker_ProspectCallBack seems to be the issue.
Is DatePicker_ProspectCallBack compatible with smalldatetime variable structure?
How do I convert to smalldatetime variable if required?
Thank you in advance for your time and efforts with this enquiry.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Is DatePicker_ProspectCallBack the ID of the DatePicker? If so, you would use DatePicker_ProspectCallBack.SelectedDate instead. The DatePicker is a control, it's never a simple value. In order to get simple values out of a control, you can look at our help file. It has detailed references about what properties are available.
|
Rank: Member Groups: Member
Joined: 11/18/2007 Posts: 18
|
DatePicker_ProspectCallBack.SelectedDate (.SelectedDate) resolved the issue fine, first time :-)
Many thanks for your response, much apprieated.
|