I have an input field defined outside the <form> area. Its a simple html
text input that is used to enter the number of hours.
<input id="HoursField" name="hours" type="text" />
I want to access this field from the server side (c# code). I tried these
two methods to access the field but they dont work. Please help.
String[] tempArray;
tempArray = Request.Form.GetValues("hours");
Response.Write (tempArray[0]);
---
string val = Request.QueryString["hours"].ToString();
Response.Write (val);
Jessica
Hi Jessica,
To access the html control in the server side we have to include the
property runat="server" in the input tag,
<input id="HoursField" name="hours" runat="server" type="text"
value="60:00"/>
In the C# code you can access the HoursField by using the code
Response.Write(HoursField.Value);
Regards,
Valli.
www.syncfusion.com
>I have an input field defined outside the <form> area. Its a simple html
>text input that is used to enter the number of hours.
[quoted text clipped - 14 lines]
>
> Jessica