c# - Problem getting value of a ASP.NET form field from httpContext -
i have declared form input in asp.net ascx file:
<input type="hidden" id="hidservicetype" name="hidservicetype" value="somevalue" />
and in web service / web method, trying value of this
httpcontext postedcontext = httpcontext.current; servicetype = postedcontext.request.form["hidservicetype"];
i can dig down postedcontext.request.form , see 2 keys 1 being "hidservicetype" "servicetype" variable = "";
what missing, seems trival.
why don't add runat="server" attribute input field , access else code-behind?
Comments
Post a Comment