Frank Hale
Frank Hale

Reputation: 1896

Get the ID of a form posted to ASP.NET

I've created an HttpHandler and I'm posting data to it. I'd like to get the form ID when it is posted but cannot figure out how to get that. I don't see any field in the HttpRequest that will give me this information. Is it possible to get the posted form ID from the HttpRequest?

Upvotes: 0

Views: 2538

Answers (3)

Andy
Andy

Reputation: 8562

The ID attribute is not submitted; its purely for client side processing. The forms Name is available. If you need it, you'll have to include in in another form element.

Upvotes: 1

tster
tster

Reputation: 18237

If the ID from the form you were looking at is in the query string then you can use Request.UrlReferrer

Upvotes: 0

Daniel A. White
Daniel A. White

Reputation: 190897

You can't get this. You could include this information in a hidden form field.

Upvotes: 5

Related Questions