1

I need some help with ASP.NET.

I have an html page that has a form tag with a couple of input tags and I want to do a Post.

Now on the server, I'm implementing IHTTPHandler. I get the response, but i don't see my input data.

How can i get what the user types in into the input tags in the http handler. I was able to do this before. But now i can't find where in the context object the results are.

3
  • Aren't they supposed to be Request variables? Commented Oct 3, 2011 at 20:01
  • @Adrian - This is an HTML file, not an ASPX file Commented Oct 3, 2011 at 20:01
  • I know. Still, it's supposed to be in the Request object. It's a HTTP Request. Look at the answers. It looks so trivial that I did not answer because I though I was missing something. Commented Oct 3, 2011 at 20:02

2 Answers 2

1

try Request["Tag's Name"] so for example to get the value from

<input type="text" name="firstname"></input>

use

Request["firstname"]

in your code behind.

Sign up to request clarification or add additional context in comments.

Comments

0
<input type="text" name="txtId"></input>

public void ProcessRequest(HttpContext context)
{
   var element = context.Request["txtId"];
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.