First Create this Procedure
CREATE PROC [SubscriberT_Insert]
@email AS VARCHAR(MAX)
AS
DECLARE @isPresent INT
SET @isPresent = (
SELECT COUNT(*)
FROM SubscriberT
WHERE email = @email
)
IF (@isPresent <= 0 )
BEGIN
INSERT INTO SubscriberT
(
email
)
VALUES
(
@email
)
END
Then Call it from Your Code and here is the Code
Try
Dim cmd As New SqlCommand("SubscriberT_Insert", con)
cmd.Parameters.AddWithValue("@email", TextBox1.Text)
cmd.CommandType = CommandType.StoredProcedure
Using con As New SqlConnection(cmd.Connection)
con.Open()
cmd.ExecuteNonQuery()
End Using
Catch ex As Exception
lblInfo.Text = "<font color="red">"+ ex.Message +"</font>"
lblInfo.Visible = True
End Try