how to avoid quotation marks in a textbox

Using the KeyPress event, you can trap any value that the user types. So here's the code to handle the quotation:

Private Sub TextBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox.KeyPress
        If e.KeyChar = Chr(34) Then e.Handled = True
    End Sub

where TextBox is the name of your textbox.

commented: Yeh! +13
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.