views:

41

answers:

1

When posting a form in ASP.NET, it adds container information to the request form keys

For example if you have a Textbox field with an ID of: txtFullName

It could end up posting something like this: ctl00_ContentPlaceHolder1_txtFullName

This is fine if you control the page where you are posting to but if you are posting to someone else's page or API then the form keys have to be exact.

I'm looking for an example of how to post a pure HTML for via asp.net or via code in vb.net/c#

TIA

+2  A: 

in ASP.Net 4 you have the ClientIDMode="Static" :)

but if you are still not on 4 you can use this solution:

http://www.west-wind.com/Weblog/posts/4605.aspx

but you have to be careful with it.

so just inherit the control you want like textbox and override this properties and you should get the result you wanted.

guy schaller