Iam using html control in mysite (idon't want to use asp controls).problem here i'am unable to get the data in label and textbox in codebehind c# he is my html controls
<form runat="server" class="sainex_form1">
<input id="txtDateTime" runat="server" value="" type="text" datetime="datetime" />
<label id="lblJobCity" runat="server">
</form>
<p class="button-row">
<input class="btn-submit" runat="server" type="image" name="image" id="Image4" onclick="UpdateActivity()" />
</p>
in updateActivity() i'm sending values to c# using jquery AJAX
and im using this code in C#
for textbox:
string a=txtDateTime.Value;
for label:
string b=lblJobCity.InnerText;
from above to i'm getting empty value and i also tried
Request.Form["lblJobCity"].ToString();
but no result plz suggest me on this
Request.Form["lblJobCity"].ToString();actually gave you no result? Not a null reference exception?<form>tag. Oh, and by the way; You can't useRequest.Formto access the information on the<label>at all. And finally; do you have ViewState disabled?