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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -