473,382 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

URL Path problem

Hi,
I have the following situation:

MyProject\Test.aspx
MyProject\Personal\View.aspx

Now I am in Page "View.aspx", and would like to be redirected in a
previous layer folder, ie into "MyProject\Test.aspx"

In the View.aspx, I am using Response.Redirect(@"Test.aspx"); but that
is giving me an error, Page Not found, because the URL to which I am
being directed is MyProject\Personal\Test.aspx

Should I give all the path(http:\\...\MyProject\...), or is there a
way how I can get around it in a simple way.

I hope someone understands my problem and can help me out.
Thanks in Advance
Nov 19 '05 #1
5 1067
try

Response.Redirect("..\\Test.aspx");
"Xarky" <be*********@yahoo.com> wrote in message
news:bc*************************@posting.google.co m...
Hi,
I have the following situation:

MyProject\Test.aspx
MyProject\Personal\View.aspx

Now I am in Page "View.aspx", and would like to be redirected in a
previous layer folder, ie into "MyProject\Test.aspx"

In the View.aspx, I am using Response.Redirect(@"Test.aspx"); but that
is giving me an error, Page Not found, because the URL to which I am
being directed is MyProject\Personal\Test.aspx

Should I give all the path(http:\\...\MyProject\...), or is there a
way how I can get around it in a simple way.

I hope someone understands my problem and can help me out.
Thanks in Advance

Nov 19 '05 #2
dinil wrote:
try

Response.Redirect("..\\Test.aspx");


URLs use forward slashes.

SCNR
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #3
dinil wrote:
try

Response.Redirect("..\\Test.aspx");


URLs use forward slashes.

SCNR
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #4
Well you could also do something like this

Response.Write("~/Test.aspx");

The ~ is .NET way of saying go to the root of my project. Hope this helps

--
TDAVISJR
aka - Tampa.NET Koder
"Joerg Jooss" <ne********@joergjooss.de> wrote in message
news:xn****************@msnews.microsoft.com...
dinil wrote:
try

Response.Redirect("..\\Test.aspx");


URLs use forward slashes.

SCNR
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de

Nov 19 '05 #5
Well you could also do something like this

Response.Write("~/Test.aspx");

The ~ is .NET way of saying go to the root of my project. Hope this helps

--
TDAVISJR
aka - Tampa.NET Koder
"Joerg Jooss" <ne********@joergjooss.de> wrote in message
news:xn****************@msnews.microsoft.com...
dinil wrote:
try

Response.Redirect("..\\Test.aspx");


URLs use forward slashes.

SCNR
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de

Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Glenn A. Harlan | last post by:
Why am I receiving the below error when calling - Path.GetTempFileName() The directory name is invalid. Description: An unhandled exception occurred during the execution of the current web...
1
by: bob | last post by:
I have created a simple Windows service in VB.Net which installs fine using InstallUtil.exe to install it to, for example "c:\test", or "c:\Windows\YellowBanana", but if I install it to "c:\Program...
5
by: David Webb | last post by:
The problem started when the Working Folder for a project was somehow set to the folder of another project. I set the correct working folder in VSS and deleted the .vbproj files that had been...
12
by: Xah Lee | last post by:
Python Doc Problem Example Quote from: http://docs.python.org/lib/module-os.path.html ---------- split( path) Split the pathname path into a pair, (head, tail) where tail is the last...
13
by: Adam | last post by:
Trying to get an asp.net 2.0 app running and am receiving this error. I see a bunch of people with this error on the net, but no solution: Works fine on my local machine, deployed to a server it...
5
by: Sakharam Phapale | last post by:
Hi All, I am using an API function, which takes file path as an input. When file path contains special characters (@,#,$,%,&,^, etc), API function gives an error as "Unable to open input file"....
10
by: wo_shi_big_stomach | last post by:
Newbie to python writing a script to recurse a directory tree and delete the first line of a file if it contains a given string. I get the same error on a Mac running OS X 10.4.8 and FreeBSD 6.1. ...
34
by: Ben Sizer | last post by:
I've installed several different versions of Python across several different versions of MS Windows, and not a single time was the Python directory or the Scripts subdirectory added to the PATH...
2
by: contractsup | last post by:
Environment: $ uname -a AIX <withheld2 5 000100614C00 $ db2level DB21085I Instance "<withheld>" uses "32" bits and DB2 code release "SQL08024" with level identifier "03050106"....
5
by: =?Utf-8?B?SmVmZiBCZWVt?= | last post by:
Before you respond with "just use GetShortPathName" please read the rest. We have an application that places files on a file server using mapped drives as it's path of choice. The reason for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.