Jump to content

Return To Last Page


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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...