Connecting Tech Pros Worldwide Forums | Help | Site Map

ASP Redirecting

ChrisN
Guest
 
Posts: n/a
#1: Nov 19 '05
Hi there,

Which way of calling pages from within your application is better (ie faster
or more efficient)?

1. "~/users/mypage.aspx?"
2. "http://www.mysite.com/users/mypage.aspx"

Perhaps someone knows of an article or something.

Thanks!
Chris.



Keith Patrick
Guest
 
Posts: n/a
#2: Nov 19 '05

re: ASP Redirecting


#1 would ultimately be faster because you can only use relative paths with
Server.Transfer, and Server.Transfer is more efficient that
Response.Redirect.

But if you are only asking in terms of Response.Redirect, then I'm not sure.


"ChrisN" <cnewald@hotmail.com> wrote in message
news:uPPceFdGFHA.3376@TK2MSFTNGP14.phx.gbl...[color=blue]
> Hi there,
>
> Which way of calling pages from within your application is better (ie
> faster or more efficient)?
>
> 1. "~/users/mypage.aspx?"
> 2. "http://www.mysite.com/users/mypage.aspx"
>
> Perhaps someone knows of an article or something.
>
> Thanks!
> Chris.
>
>[/color]


MasterGaurav
Guest
 
Posts: n/a
#3: Nov 19 '05

re: ASP Redirecting


Go for the first one.
Don't go for just faster or more efficient... worry about code
maintenance.

A difference of microseconds in performance will not matter.

--
Cheers,
Gaurav Vaish
http://mastergaurav.org
http://mastergaurav.blogspot.com
------------------------

ChrisN
Guest
 
Posts: n/a
#4: Nov 19 '05

re: ASP Redirecting


Would you know how to do a Server.Transfer but in a way that would end up
calling my secure https page as opposed to my http one?

For example, I need to run:

Server.Transer("~/users/mypage.aspx")

and the result would be:

https://www.mysite.com/users/mypage.aspx

and not

http://www.mysite.com/users/mypage.aspx

I'm asking because I have a local version of my site that I would like to
test before updating. This way I'm trying to stick with realative paths as
opposed to full url's.

Thanks again,
Chris.



"Keith Patrick" <richard_keith_patrick@nospam.hotmail.com> wrote in message
news:OCppsIdGFHA.2356@TK2MSFTNGP12.phx.gbl...[color=blue]
> #1 would ultimately be faster because you can only use relative paths with
> Server.Transfer, and Server.Transfer is more efficient that
> Response.Redirect.
>
> But if you are only asking in terms of Response.Redirect, then I'm not
> sure.
>
>
> "ChrisN" <cnewald@hotmail.com> wrote in message
> news:uPPceFdGFHA.3376@TK2MSFTNGP14.phx.gbl...[color=green]
>> Hi there,
>>
>> Which way of calling pages from within your application is better (ie
>> faster or more efficient)?
>>
>> 1. "~/users/mypage.aspx?"
>> 2. "http://www.mysite.com/users/mypage.aspx"
>>
>> Perhaps someone knows of an article or something.
>>
>> Thanks!
>> Chris.
>>
>>[/color]
>
>[/color]


ChrisN
Guest
 
Posts: n/a
#5: Nov 19 '05

re: ASP Redirecting


Thanks,

That's what I'm trying to do. What I'm stuck on is how to redirect using
server relative paths but making the result page use https as opposed to
http? I need to jump from a non-secure page to a secure user-login page.

Example:

Response.Redirect("~/users/mypage.aspx") =>
https://www.mysite.com/users/mypage.aspx

Any ideas?

Chris.

"MasterGaurav" <gaurav.vaish@gmail.com> wrote in message
news:1109183120.042290.270000@f14g2000cwb.googlegr oups.com...[color=blue]
> Go for the first one.
> Don't go for just faster or more efficient... worry about code
> maintenance.
>
> A difference of microseconds in performance will not matter.
>
> --
> Cheers,
> Gaurav Vaish
> http://mastergaurav.org
> http://mastergaurav.blogspot.com
> ------------------------
>[/color]


Emad Al-Ashi
Guest
 
Posts: n/a
#6: Nov 19 '05

re: ASP Redirecting


i think that the answer lies in this article, read the part :
"Use Absolute URLs for Navigation"
http://msdn.microsoft.com/library/de...l/THCMCh10.asp

i hope this will direct u in some way, and btw...Gaurav speaks the truth
truth!!! maintenance!!

"ChrisN" <cnewald@hotmail.com> wrote in message
news:%23P9XobdGFHA.2736@TK2MSFTNGP12.phx.gbl...[color=blue]
> Thanks,
>
> That's what I'm trying to do. What I'm stuck on is how to redirect using
> server relative paths but making the result page use https as opposed to
> http? I need to jump from a non-secure page to a secure user-login page.
>
> Example:
>
> Response.Redirect("~/users/mypage.aspx") =>
> https://www.mysite.com/users/mypage.aspx
>
> Any ideas?
>
> Chris.
>
> "MasterGaurav" <gaurav.vaish@gmail.com> wrote in message
> news:1109183120.042290.270000@f14g2000cwb.googlegr oups.com...[color=green]
>> Go for the first one.
>> Don't go for just faster or more efficient... worry about code
>> maintenance.
>>
>> A difference of microseconds in performance will not matter.
>>
>> --
>> Cheers,
>> Gaurav Vaish
>> http://mastergaurav.org
>> http://mastergaurav.blogspot.com
>> ------------------------
>>[/color]
>
>[/color]


Closed Thread