Jump to content

Return To Last Page


lbenezra

Recommended Posts

HiI try another solution to my problem, instead of Link Botton add an ankor with href link , it work at problem page , but there is one page that work only in the main language and I don't want to open a new page just stay in the same page. when I press the link a blank page is opened.The link goto a switch.asp page and there with a case command I can open the correct page in the other language. but I want to say if page > 11 return the last page it was.the href line in the master page:<div align="right" class="headmenuE"><a href="HomePage_en.aspx">Home</a> | <a href="ContactN_en.aspx">Contact Us</a> |<a href="switchpage.aspx?lang=heb">Hebrew-עברית</a> </div>--------------------------------------------------------------------------------------------------------------There is the switch .aspx.cs code:---------------------------------------public partial class switchpage : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { string lang = Request.QueryString["lang"]; Session["lang"] = lang; int pagenum = Convert.ToInt32(Session["page"]); if (pagenum < 11) { switch (pagenum) { case 1: Response.Redirect("HomePage_en.aspx?lang=" + lang); break; case 2: Response.Redirect("AboutUs_en.aspx?lang=" + lang); break; case 3: Response.Redirect("History_en.aspx?lang=" + lang); break; case 4: Response.Redirect("Group_en.aspx?lang=" + lang); break; case 5: Response.Redirect("ServicesN_en.aspx?lang=" + lang); break; case 6: Response.Redirect("Operation_en.aspx?lang=" + lang); break; case 7: Response.Redirect("Industries_" + lang + ".aspx"); break; case 8: Int32 ACT_ID = Convert.ToInt32(Session["activity"]); Response.Redirect("prOductsTabs_" + lang + ".aspx?ActivityID=" + ACT_ID); break; case 9: Response.Redirect("ContactN_" + lang + ".aspx"); break; case 10: Response.Redirect("SearchResultsN_" + lang + ".aspx"); break; default: Response.Redirect("HOMEPAGE_EN.aspx?lang=en"); break; } } }-----------------------------------------------------

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...