Results 1 to 7 of 7

Thread: How to set the value/text in the address bar of Browser

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2006
    Posts
    275

    How to set the value/text in the address bar of Browser

    Hi

    I have to set the value/text of address bar from browser.

    I have tried this:

    Request.URIRefferer.to String()

    However I could find the value which can set the text on address bar.

    Thanks in Advance

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: How to set the value/text in the address bar of Browser

    What about this one ?

    Code:
    Request.Url.AbsoluteUri
    Please mark you thread resolved using the Thread Tools as shown

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How to set the value/text in the address bar of Browser

    You cannot change the URL in the address bar from what it already is. You can read it. Or you can Response.Redirect the user to another page, which effectively changes the URL in the address bar. What are you trying to accomplish?

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2006
    Posts
    275

    Re: How to set the value/text in the address bar of Browser

    Actually trying to hide the URL bein represented in the Address bar, Like if it is http://192.168.100.45/MyPage.aspx
    It should be displayed like http://MyDirectory/MyPage.aspx etc

    Thanks

  5. #5
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    592

    Re: How to set the value/text in the address bar of Browser

    i am not 100% sure that this will help but you can give it a try.
    http://msdn.microsoft.com/en-us/library/ms972974.aspx
    It's an article about URL Rewriting in ASP.NET.

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How to set the value/text in the address bar of Browser

    Quote Originally Posted by Abbas Haider
    Actually trying to hide the URL bein represented in the Address bar, Like if it is http://192.168.100.45/MyPage.aspx
    It should be displayed like http://MyDirectory/MyPage.aspx etc

    Thanks
    192.168.100.45 is an internal IP address, and MyDirectory is something local to you. Because it's internal, it's irrelevant what URL you use to browse to your pages. What matters is production/live. When working on a live environment, you may want http://example.com redirect to http://www.example.com, that's URL canonization and can either be done in code or at the ISP Registrar level, but you need to be more specific about what you want.

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2006
    Posts
    275

    Re: How to set the value/text in the address bar of Browser

    Quote Originally Posted by selanec
    i am not 100% sure that this will help but you can give it a try.
    http://msdn.microsoft.com/en-us/library/ms972974.aspx
    It's an article about URL Rewriting in ASP.NET.

    This is somewhat helpful however it is too complicated, And thats the thing I want to achieve. One of my friends suggested that you are able to do so using GET/POST method, I have found the Get method from MSDN i.e:

    http://msdn.microsoft.com/en-us/libr...od(VS.85).aspx

    However I couldn't find the POST method, However I found this:

    http://msdn.microsoft.com/en-us/library/debx8sh9.aspx

    This method if applied works on same page, I need to pass values to other page,
    If I use query strings then they are visible to end user and the page can be retrieved from history. If I use authentication on it for using Session("") object it cannot be done as I have already stated that my pages are scattered for different machines.
    Please help.
    If required I may start a new thread for security as basically I need to restirct the user for entering my page unless he logs in, The problem is my pages are scattered on different machines and they are not on one virtual directory
    I redirects from one page to other like
    Response.Redirect("http://192.168.102.2/OnePage.aspx") and so on
    Last edited by Abbas Haider; Sep 29th, 2008 at 01:39 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width