Link to home
Start Free TrialLog in
Avatar of MandyProgza
MandyProgza

asked on

Response.redirect (The resource cannot be found)

Hi

VS 2005 and .Net framework 2

I am redirecting to a folder within the app but get message that resource can't be found
while working on a single enterprise whereas others go through to the next screen.

My redirect is :
            Response.Redirect("~/Forms/frmPart2.aspx?Unit_Nbr=" & Trim$(Master.txtNumberENlbl.Text) & "&USICode=" & Trim$(Master.txtUSICodee.Text) & "&SurveyDate=" & Trim$(Master.lblSurvey_CodeR.Text) & "&LegalName=" & Trim$(Master.txtLegalTradeNamee.Text) & "&Phone=" & Trim$(Master.txtContactNumberr.Text) & "&Ou_Nbr=" & Trim$(Master.txtNumberOUlbl.Text) & "&MaintUser=" & Trim$(MaintUser) & "&MaintDate=" & Trim$(Now.Date) & "&Status_Colour=" & Trim$(Master.txtStatuSS.Text) & "&SystemMode=" & Trim$(Master.lblModes.Text))

Error given is:

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies)
could have been removed, had its name changed, or is temporarily unavailable.  P
lease review the following URL and make sure that it is spelled correctly.

Requested URL:  /Agriculture 2010/Forms/~/Forms/frmPart2.aspx

What could be the cause of : '/~/' since I am requesting  /Agriculture 2010/Forms/frmPart2.aspx

It seems to be looking in two forms folders and there is this /~/ in between.
The forms are in the Agriculture 2010 folder, being the project folder.

Please assist with a solution.

Thanks, Mandyprogza


Avatar of John Easton
John Easton
Flag of United Kingdom of Great Britain and Northern Ireland image

I have never used ASP.NET, however in classic ASP to go back a folder you should use '../' in place of '~/'

I this doesn't apply to .NET I'm sure someone will correct me!
ASKER CERTIFIED SOLUTION
Avatar of Vaughn Bigham
Vaughn Bigham
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial