Nathan J Pledger

Program.X musings from the Isle of Man concerning ASP.NET, in particular accessibility, web standards and neat ideas.

I Fail to see the point

... of this new alternative postback URL feature that .NET 2.0 offers.

I thought I'd use it to post some hidden variables to PayPal, being glad that .NET finally has some flexibility that makes me feel less ashamed when PHP developers say its easy to do!

But it doesn't work! The variables don't post. These are client side variables, so:

<input type="hidden" id="cmd" value="_xclick" />
<input type="hidden" id="return" value="returnurl.aspx" />

Don't appear at the other side. I verified this by doing a dumb page that just had the following code in:

foreach (string key in Request.Form.AllKeys)
{
    p.Controls.Add(new LiteralControl(key+"="+Request.Form[key]+"<br />"
));
}

And got nothing apart from ASP.NET form variables.

So, I ask ... what is the point?

Consider also that I am still getting "name" attributes in supposed XHTML pages, even though the site is built in VS.NET 2005 with XHTML 1.0 Strict, and set so in Web.config:

<xhtmlConformance mode="Strict"/>

So, me and .NET 2.0 ain't getting along too well at the moment....

Comments

Olaf Conijn said:

IIRC the html spec uses an "name" attribute (istead of "id", which is used in aspx).

The currect tags should be:
<input type="hidden" name="cmd" id="cmd" value="_xclick" />
<input type="hidden" name="return" id="return" value="returnurl.aspx" />

(but will have to admit it has been a while)
# March 27, 2006 1:27 PM

Olaf Conijn said:

(nevermind my comment, failed to read the whole post)
# March 27, 2006 1:30 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)