TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
dhanya rai
NA
10
18.3k
Change password code in asp.net with vb
Apr 1 2012 12:17 AM
hey all..i want change password code in asp.net with vb..
i wrote following code..but the thing is that the user can enter any email id or password and update it.
Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
Dim cn As New SqlClient.SqlConnection(cnstring)
Dim cmd As New SqlClient.SqlCommand
Dim sql As String
Dim vname, vpswd, vnew, vid As String
Try
vname = TextName.Text
vpswd = TextOPswrd.Text
vnew = TextNew.Text
vid = TextEID.Text
sql = "update Reg set Pswrd=@Pswrd where EID=@EID"
cn.Open()
cmd.CommandType = CommandType.Text
cmd.CommandText = sql
cmd.Connection = cn
cmd.Parameters.AddWithValue("@EID", vid)
cmd.Parameters.AddWithValue("@Pswrd", vnew)
cmd.ExecuteNonQuery()
Literal1.Text = "<b>Your password has been changed successfully</b>"
cn.Close()
Catch ex As Exception
Literal1.Text = ex.ToString
End Try
End Sub
Reply
Answers (
1
)
Error to Create Team Project From Visual Studio 2008 to TFS 2010
LinkLabel in Default MessageBox using VB.NET/C#