Welcome Guest Search | Active Topics | Sign In | Register

DatePicker control - variable structure Options
amillyard
Posted: Sunday, November 18, 2007 2:59:47 PM
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.
eo_support
Posted: Sunday, November 18, 2007 3:19:46 PM
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.
amillyard
Posted: Sunday, November 18, 2007 3:26:22 PM
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.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.