In the html file to redirect the page using Javascript, which I used as
window.location.href = "http://www.google.com/";
Works great. But when I tried in .aspx, it does not work. Below is my code. thanks in advance
<head runat="server">
<script type="text/javascript">
function PageRedirect() {
window.location.href = "http://www.google.com/";
}
</script>
</head>
<body>
<form runat="server">
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="PageRedirect()"/>
</form>
source
share