It's a really bad way of getting into the request collections. The Params object contains everything in the query string, form collection, server variables, and cookies collections for the current request.

I would advise to never use the params collection and instead always use the proper collection specifically to make your code easier to read.

Example:

HyperLink hlRegister = new HyperLink();

hlRegister.Text = "Click me!";
hlRegister.NavigateUrl = String.Format("register.aspx?ReturnUrl={0}", Request.QueryString["ReturnUrl"]);

this.Controls.Add(hlRegister);

So... what does this do? Well, if your url was this:

http://www.mysite.com/myPage.aspx?ReturnUrl=www.google.com

Then the above code would end up rendering an anchor tag like this:

<a href="" me!</a>

-Brian

-----Original Message-----
From: Lude Gullit [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 10, 2004 2:31 PM
To: [EMAIL PROTECTED]
Subject: [C#.NET] What does this mean?


Hi

Can anyone tell me this means? Thanks

����������� strLinkPath = String.Format("Register.aspx?ReturnUrl=
{0}", Request.Params("ReturnUrl"))
����������� lnkRegister.NavigateUrl = String.Format(strLinkPath)





Yahoo! Groups Sponsor

Get unlimited calls to
U.S./Canada




Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/CSharpNET/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=groups/S=:HM/A=2128215/rand=344582666


Yahoo! Groups Links

Reply via email to