|
Rank: Newbie Groups: Member
Joined: 3/23/2011 Posts: 3
|
I am adding your date and time picker to a gridview to update a date time field in SQL database. I can get the picker to display the date and time in the database but I cannot get it to updated the database. How can I take the data from the field and put it into a variable to update the database with?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I believe you can use ASP.NET data binding expression to do that, however the detail is unrelated to our product thus is beyond the scope of our support. If you search online you should be able to find plenty of information about that topic. Just think our DatePicker as a simple TextBox. It takes a DateTime value and gives you back a new one if user has changed it. It does not deal with your data source directly.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 3/23/2011 Posts: 3
|
I have tried to use your datePicker as a textbox but I get this error
Unable to cast object of type 'EO.Web.DatePicker' to type 'System.Web.UI.WebControls.TextBox'.
Any ideas?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We are not asking you to cast the DatePicker. We are asking you "think" they are the same conceptually. They are conceptually similar because both takes a value and let users to modify it. That means your code structure would be the same regardless whether you are working with DatePicker or a TextBox. However having the same structure doesn't mean having the exact same code. These two are obviously two totally different animals and you simply can not cast one to another.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 3/23/2011 Posts: 3
|
this worked perfect
'Sends the value of the Transaction date/time box, clock in date/time box, and clock out date/time box to a variable transDateValue = transDate.SelectedDate ClockInValue = ClockIn.SelectedDate ClockOutValue = ClockOut.SelectedDate
|
|