0

I want to navigate from VacancyDetails to JPHome as new page.I have two folders with web pages of their own. On clicking button on one webform of Recruitment folder I wanted to navigate to web page of JobPortal folder webform as new page.

Navigation within same folder is succeeded but while navigating to page of new folder, the link got the current folder name also which is unwanted so there arouse error.

Response.Write("window.open('JobPortal/JPHome.aspx','_blank')");

i have tried that and what i got after firing the event from recruitment webform is

'Recruitment/JobPortal/JPHome.aspx'

but i want to navigate to 'JobPortal/JPHome.aspx'

Neevan
  • 25
  • 7

1 Answers1

0

Use the code as below

Response.Write("window.open('../JobPortal/JPHome.aspx','_blank')");

First you need to go one folder above using ../
And then to folder JobPortal/
And then to page JPHome.aspx

Or you can use the absolute path in your code.

शेखर
  • 17,412
  • 13
  • 61
  • 117
  • Is there difference between '~/' and '../'? I have tried '~/' it didn't worked so removed it. hadn't think about '../' it worked. – Neevan Nov 05 '19 at 06:31
  • One is C# specific `~/` and the other can be used any where. [More details](https://stackoverflow.com/questions/893144/equivalent-in-javascript) – शेखर Nov 05 '19 at 06:34
  • it is not getting processed it is just string in double quotes. You can refer this [question](https://stackoverflow.com/questions/1874636/what-is-the-difference-between-resolveurl-and-resolveclienturl) it will help you. – शेखर Nov 05 '19 at 06:37