user2955849
user2955849

Reputation: 13

Show Asp.Net Page By Using Javascript

Is it possible in javascript to open new aspx page by using javascript?.

I mean if I wants to open a new page in asp.net than I will use "Server.Transfer" method to open new aspx page the same thing I am asking over here to open new aspx page by using javascript.

Is it possible?.

I am trying as per your suggestion as below:

<script type="text/javascript">
$(document).ready(function()
{
  function kpr(e)
  {
    if(e.which==17 && e.which==18 && e.which==82 || e.keyCode==17 && e.keyCode==18 &&   e.keyCode==82)
    {
      window.location.href="MemberInfo.aspx";
    }
  }
});
</script>

but it not allowed me to show new page as above........

Upvotes: 0

Views: 312

Answers (3)

Tobberoth
Tobberoth

Reputation: 9527

Try using the debugging tools of your browser and set a checkpoint in your function to make sure that it actually gets to the window.location.href line.

Upvotes: 0

MusicLovingIndianGirl
MusicLovingIndianGirl

Reputation: 5947

Try this in your client side function:

window.location.assign("Page.aspx")

Upvotes: 0

Paddy
Paddy

Reputation: 33857

Something like this (in the appropriate point in your script):

window.location.href = "OtherPage.aspx"

Upvotes: 3

Related Questions