URL for server page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?TmVpbCBC?=

    URL for server page

    I'm developing a Web App using C#. I want a page in the app to refer to
    another page in the app. I tried to create a web request with the page
    address below:

    pageAddress = "http://~/clientDBQuery.a spx";
    WebRequest request = WebRequest.Crea te (pageAddress);

    and got the following error:

    Exception Details: System.UriForma tException: Invalid URI: The hostname
    could not be parsed.

    What is the syntax for referring to a page on the current site so I don't
    have to change it when it's published?


    When I used the following page address:

    pageAddress = "http://clientDBQuery.a spx";

    I didn't get the parsing error but the debugger didn't stop on a break point
    I set in the LoadPage method. This seems to occurr because it goes to a page
    on my ISP which doesn't exist.

    What's the right way to handle this situation?

    Thanks, Neil

Working...