简体   繁体   中英

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?

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

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.

如果您正在查看的表单中的ID位于查询字符串中,则可以使用Request.UrlReferrer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM