If directing a web client, use Response.Redirect(ResolveUrl("~/abc.aspx"));
If executing the .aspx file from the server without redirecting the client,
try:
Server.Execute(ResolveUrl("~/abc.aspx"));
If accessing the .aspx file itself directly on the server, one would ask
why? I can understand this for an .xml file, but why read an .aspx directly?
At any rate, you can read files on the server using:
//myFile = "~/abc.xml"
if (myFile.StartsWith("~")) myFile = myFile.Replace("/", "\\")
.Replace("~", Request.PhysicalApplicationPath);
or,
myFile = Request.MapPath(myFile);
Jon
"LP" <lp@yahoo.comwrote in message
news:f0**********@reader01.singnet.com.sg...
Hi all,
When I choose a destination url a ~ symbol is inserted for me eg
~\apppath\abc.aspx. But when I run the aspx, it can't find the file
abc.aspx. but if I type the full pathname it can find the file eg
c:\inetpub\ccc\abc.aspx. any idea?
thanks