Connecting Tech Pros Worldwide Help | Site Map

is there any way we can hide the default.aspx and on address bar we just have test=on

Newbie
 
Join Date: Mar 2009
Posts: 12
#1: Jun 13 '09
hi,
i want help for-- like
responce.redirect("default.aspx?test=one");
query string . on redirect page address bar we have value like http:// default.aspx?test=one

is there any way we can hide the default.aspx and on address bar we just have test=one is ther any way to this.
thanks in advance
plz help me to sort out this
best answer - posted by Frinavale
Server.Transfer() has some peculiar behaviours that you should be aware of. When you use Server.Transfer() to transfer from page1 to page2, all of the variables available to/for page1 will also be available in page2.

There are some really weird things that can happen when using this method if you use it incorrectly. If you're planning on using this method then you should do extensive research before you implement anything. I would start by reading up on the method using MSDN first.

You could consider using url rewriting (I think you're probably more interested in this than using Server.Transfer)

If you're really keen on catching up to the web 2.0 world, consider using ASP.NET MVC.

-Frinny
Familiar Sight
 
Join Date: Dec 2008
Posts: 202
#2: Jun 15 '09

re: is there any way we can hide the default.aspx and on address bar we just have test=on


Server.Transfer(string url) will make the client feel that he stills in the same page. and the destination-page's url will not appear.
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,066
#3: Jun 15 '09

re: is there any way we can hide the default.aspx and on address bar we just have test=on


Server.Transfer() has some peculiar behaviours that you should be aware of. When you use Server.Transfer() to transfer from page1 to page2, all of the variables available to/for page1 will also be available in page2.

There are some really weird things that can happen when using this method if you use it incorrectly. If you're planning on using this method then you should do extensive research before you implement anything. I would start by reading up on the method using MSDN first.

You could consider using url rewriting (I think you're probably more interested in this than using Server.Transfer)

If you're really keen on catching up to the web 2.0 world, consider using ASP.NET MVC.

-Frinny
Familiar Sight
 
Join Date: Dec 2008
Posts: 202
#4: Jun 15 '09

re: is there any way we can hide the default.aspx and on address bar we just have test=on


Thanks a lot Frinny, I has done some search about url rewriting before posting but I thought it is more difficult.
I didn't know about Server.Transfer that behavior. So thanks for this it will improve my information.

Regards,
Bassem
Newbie
 
Join Date: Nov 2009
Posts: 1
#5: 2 Weeks Ago

re: is there any way we can hide the default.aspx and on address bar we just have test=on


Try:
Dim URL As String
URL = "default.aspx?test=one"
Response.Redirect(Replace(LCase(URL), "/default.aspx", "/")

Result:
/?test=one

Regards,
Alex
maliksleo's Avatar
Member
 
Join Date: Feb 2009
Location: Islamabad, Pakistan
Posts: 115
#6: 1 Week Ago

re: is there any way we can hide the default.aspx and on address bar we just have test=on


i think url rewriting is the best way try to understand this concept its realy interesting and useful for you

maliksleo
Reply