Click here to Skip to main content
15,920,603 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai,

Here in my project i want to move one aspx page to another aspx page by using Javascript. I tried this code but its not working
XML
<script language="javascript">
        function Login() {
            var User = document.getElementById('<%=Txtusername.ClientID%>').value;
            var Pass = document.getElementById('<%=TxtPassword.ClientID%>').value;
            if (User == "admin" && Pass == "admin") {
                window.location.href = 'Home.aspx';

              
            }
            else {
               
            }
        }
    </script>

Its not moving to another page.staying in same page. I want to move page when i click asp.net button. but its not working. if am using html button then its working.
So please help me

Thanks
Sujith
Posted
Updated 27-Oct-11 18:35pm
v2

 
Share this answer
 
v2
XML
<script language="JavaScript" type="text/javascript" ><
location.href="http://www.roseindia.net";
></script>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900