0

It may be a silly question but still I would like to know. I have page under site pages, a web part on that page, and a link button on the web part. I want to navigate to another page under site pages from that link button on the web part. What should be the relative URL to the page?

1

Please try this

Response.Redirect("PageName.aspx"); 

Or

Response.Redirect("/SiteCollection/Site/SitePages/PageName.aspx");
  • I want to avoid Site Collection and site name. – V.B Jul 3 '14 at 7:44
  • Please try the first one then ! – Varun Verma Jul 3 '14 at 7:44
  • Please mark it as answer if it solves your problem – Varun Verma Jul 3 '14 at 7:46
  • Indeed Response.Redirect works but I am curious to know is it poosible by setting the page URL in HTML or PostBackURL. – V.B Jul 3 '14 at 7:48
  • Didn't got you. The Relative URL is simple i;e "PageName.aspx". Just use this, a simple anchor tag will also work like <a href="PageName.aspx"/> – Varun Verma Jul 3 '14 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.