Tips and tricks for .NET using ASP and VB code.

Prevent ASP textbox from accepting Enter key.

    Protected Sub TextBox1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Load
        TextBox1.Attributes.Add("onKeyPress", "return event.keyCode!=13")
    End Sub

No comments:

Post a Comment

Search This Blog