Hi,
If I enter any number in a TextBox I want to open some .aspx page. I don't want to click on any button. How should I do this in asp.net?
<html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <script type = "text/javascript"> function Redirect(val) { switch (val) { case "1": window.location = "http://www.asp.net"; break; case "2": window.location = "http://www.aspsnippets.com"; break; case "3": window.location = "http://www.aspforums.net"; break; } } </script> </head> <body> <form id="form1" runat="server"> <input type = "text" onkeyup = "Redirect(this.value)" /> </form> </body> </html>
Demo
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.