Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting data from an Input control in to code behind

I am using asp.net C# I am also using the jQuery UI Calendar control. calendar control

It appears the calendar control wants to work with an input control with an ID of "datepicker".

<input type="text" id="datepicker"  />

I want to use value of the input control in my code behind but seeing how it is not an asp.net control I am not sure how I can reference it in the code behind.

Does anyone know how to get the value of the input control in the code behind?

like image 331
twamn Avatar asked Jun 04 '26 00:06

twamn


1 Answers

use

<input type="text" id="datepicker" name="datepicker" />

and in the code behind:

Request.Form["datepicker"]

In fact, Form property of Request is populated with form values.

like image 131
onof Avatar answered Jun 05 '26 14:06

onof



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!