For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > November 2006 > How does this code work?(Request["ReturnUrl"])









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How does this code work?(Request["ReturnUrl"])
vvkl

2006-11-30, 7:03 pm

I have readed a example code from MSDN about FormsAuthenticationTicket
calss, but there's a line I can't understand :
'strRedirect = Request["ReturnUrl"];'
What's the mean in which square brackets?

Thank you!

A Chinese student.


Marina Levit [MVP]

2006-11-30, 7:03 pm

That is using the indexer for the object to index into it by name.

"vvkl" <mavok220@hotmail.com> wrote in message
news:ORxX7vJFHHA.1216@TK2MSFTNGP05.phx.gbl...
>I have readed a example code from MSDN about FormsAuthenticationTicket
>calss, but there's a line I can't understand :
> 'strRedirect = Request["ReturnUrl"];'
> What's the mean in which square brackets?
>
> Thank you!
>
> A Chinese student.
>



vvkl

2006-11-30, 7:03 pm

I can't understant well.
Could you give an example?
I want to know when is the Request["ReturnUrl"]'s value not null?

"Marina Levit [MVP]" <someone@nospam.com> 写入消息新闻:%23dWjUyJFHHA.1080@TK2MSFTNGP05.phx.gbl...
> That is using the indexer for the object to index into it by name.
>
> "vvkl" <mavok220@hotmail.com> wrote in message
> news:ORxX7vJFHHA.1216@TK2MSFTNGP05.phx.gbl...
>
>



Rad [Visual C# MVP]

2006-11-30, 7:03 pm

That is a feature of authentication. When you try and access a page
without logging in, asp.net will redirect you to the login page. The
value in the "ReturnURL" value of the query string will be the page
you original requested

On Fri, 1 Dec 2006 00:23:48 +0800, "vvkl" <mavok220@hotmail.com>
wrote:

>I have readed a example code from MSDN about FormsAuthenticationTicket
>calss, but there's a line I can't understand :
>'strRedirect = Request["ReturnUrl"];'
>What's the mean in which square brackets?
>
>Thank you!
>
>A Chinese student.
>

--

Bits.Bytes.
http://bytes.thinkersroom.com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com