Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateTimePicker Control Getting the Value 1

Status
Not open for further replies.

tmishue

Programmer
Jun 26, 2001
35
0
0
US
Hey,

I have a form containing the DateTimePicker Control. When I click the submit button I need to access the value of the datetimepicker control and the process.asp page. I have tried the following:


On the onchange event

stdte = datetimepicker.value

and in the process.asp doing

stdate = Request.Form ("stdte")

I have also tried on process.asp:

stdate = Request.Form ("datetimepicker")

I am at a lost. I am fairly new to VB and ASP so any help would be highly appreciated.

Thanks
tbmishue
 
1. unfortunately, the datetimepicker control in asp, does not have a value until it is passed to the next page. This is really a hinderance when trying to check the date BEFORE it is submitted.

2. Make sure that you have an NAME tag for the datetimepicker (i.e. Name="dtpMain") then on the processing form:

myvar = request.form("dtpMain")

I have found that if you just try to set the ID, it does not pass that accross with the form, therefore, I have had to set the NAME property.

Hope this helps.

PS, you might get a quicker response, if you post the ASP questions to the ASP Forum.

:) Tazzmann
 
Thanks soo much TazzMan! Your right I had set the ID but not the name. Once I set the name as you suggested everything worked beautifully!!!! Thanks for the fast and helpful response.

tbmishue
*:->*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top