views:

56

answers:

2

If I add this to the ASPX page:

<input id="Text1" type="text" value="Text1Value" />

I would expect to see "Text1" in the list of Request Form keys even WITHOUT setting the runat=Server property.

? request.Form.AllKeys

I realize that if I do set that propery, then I will have a server-sided HTML control that I can reference using the name "Text1," but shouldn't I be able to access the text in the text box using the following VB.NET syntax?

request.Form("Text1")

A: 

The textbox on page1.aspx is available in teh Request.Forms collection on Page2 when posting from 2 to 1.

But, when using a ASP.NET button to postback to Page1, it seems not to be. Dunno why yet...

Velika
+2  A: 

Because you need to add the name attribute. Try this

<input id="Text1" name="Text1" type="text" value="Text1Value" />

Claudio Redi
It's more than that. See my answer, too.
Velika