1

What's the best way to pass values from a HTML tag/elements to code behind without using the runat="server". Example

<input id="tags" type="text" />

Now, I want to pass the value of tags to code behind.

string tagsvalue = this.Request.Form.Get( "tags" );

I'm trying to use the code above but is not working. Any help will be really appreciate it.

4

1 に答える 1

5

You use the name attribute to specify the name in the name/value pair not the id

<input name="tags" id="tags" type="text" />
于 2012-06-27T23:53:52.210 に答える