Hi,
I'm using vb.net 2005. In my code behind i wrote like this code..
[code=vbnet]
Partial Class SearchTxt
Inherits System.Web.UI.P age
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s) Handles Me.Load
End Sub
Protected Sub TextBox1_TextCh anged(ByVal sender As Object, ByVal e As System.EventArg s) Handles TextBox1.TextCh anged
If Not TextBox1.Text = "" Then
Response.Redire ct("Page2.aspx? txt=" & TextBox1.Text)
End If
End Sub
End Class
[/code]
Now what i want is i want the page to redirect only if the enter key is pressed inside the textbox...Pleas e tell me how to write the code inside TextBox1_TextCh anged..
I'm using vb.net 2005. In my code behind i wrote like this code..
[code=vbnet]
Partial Class SearchTxt
Inherits System.Web.UI.P age
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s) Handles Me.Load
End Sub
Protected Sub TextBox1_TextCh anged(ByVal sender As Object, ByVal e As System.EventArg s) Handles TextBox1.TextCh anged
If Not TextBox1.Text = "" Then
Response.Redire ct("Page2.aspx? txt=" & TextBox1.Text)
End If
End Sub
End Class
[/code]
Now what i want is i want the page to redirect only if the enter key is pressed inside the textbox...Pleas e tell me how to write the code inside TextBox1_TextCh anged..
Comment