Skip to content

Redirect back from folder by window.location with alert mess

Asma Siddiqua

Asked Jun 20, 2015, 12:34 AM EDT2 answers
Share
LinkedInX
How to redirect back from folder by window.location with alert message in asp.net c#I tried like below many methodes some are responding resource not found and some are reloading same page unlimited time.
C#
ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "alert('test 9'); window.location='" + HttpRuntime.AppDomainAppPath + "/LoginPage.aspx';", true);
Code
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "ScriptKey", "alert('Your session timed out.');window.location='../LoginPage.aspx'; ", true);
Code
ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Your session timed out');window.location.href ='../LoginPage.aspx';", true);
 

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    $(document).ready(function() { $( "button" ) .button(); $("#cancel") .click(function( event ) { alert("click"); //Below Line Doesn't work window.location.href = "/Process.aspx"; //Below Line Does work window.location.href = "http://localhost:65215/Process.aspx"; }); });
    0
  • 1 short reply
    • -1
      if i publish online then?
      -1