How to create a Registration /Sign Up form in VB.Net

Published: 10 December 2018
on channel: Funda Of Web IT
82,921
752

Here.. in this video we are doing the registration or sign up form for the person to register for his email id and password with some details.. we are storing data into database. Code given Below.

Try
Dim con As New SqlConnection
Dim cmd As New SqlCommand
Dim dr As SqlDataReader

con.ConnectionString = "Data Source=(LocalDB)\v11.0;AttachDbFilename=c:\users\ved prakash n\documents\visual studio 2012\Projects\FundaProjectVB\FundaProjectVB\FundaProject.mdf;Integrated Security=True"
con.Open()
cmd.Connection = con
cmd.CommandType = CommandType.Text
cmd.CommandText = "select * from register where email='" & email.Text & "' "
dr = cmd.ExecuteReader
If dr.HasRows Then
MsgBox("Email Id Already Registered", MsgBoxStyle.Critical)
con.Close()
Else
con.Close()
con.Open()
cmd = New SqlCommand("INSERT INTO register values('" & fname.Text & "','" & lname.Text & "','" & gender.Text & "','" & phone.Text & "','" & email.Text & "','" & password.Text & "')", con)
If (fname.Text = "" And lname.Text = "" And gender.Text = "" And phone.Text = "" And email.Text = "" And password.Text = "") Then
MessageBox.Show("Please enter the details")
Else
cmd.ExecuteNonQuery()
MsgBox("Succerssfully Registered.", MsgBoxStyle.Information, "Success")
Me.Hide()
login.show()
fname.Clear()
lname.Clear()
gender.Text = " "
phone.Clear()
email.Clear()
password.Clear()
End If
con.Close()
End If
con.Close()
Catch ex As Exception
MsgBox("Error")
End Try
.


Watch video How to create a Registration /Sign Up form in VB.Net online without registration, duration hours minute second in high quality. This video was added by user Funda Of Web IT 10 December 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 82,921 once and liked it 752 people.