If txtPassword.Text = txtCpassword.Text Then
Dim StrTempChar As String
Dim i As Integer
Dim MyPwd As String
MyPwd = txtPassword.Text
For i = 1 To Len(MyPwd)
If Asc(Mid$(MyPwd, i, 1)) < 128 Then
StrTempChar = CType(Asc(Mid$(MyPwd, i, 1)) + 128, String)
ElseIf Asc(Mid$(MyPwd, i, 1)) > 128 Then
StrTempChar = CType(Asc(Mid$(MyPwd, i, 1)) - 128, String)
End If
Mid$(MyPwd, i, 1) = Chr(CType(StrTempChar, Integer))
Next i
Conn.Open()
Comm = New Data.SqlClient.SqlCommand
Comm.Connection = Conn
Comm.CommandType = Data.CommandType.Text
Comm.CommandText = "Insert Into customer (Emailid,Password,Userid,Add1,State,City,Pin,Title,Fname,Lname,Gender,Dob,Mobile,Regidate) " & _
" values('" & txtEmailid.Text & "','" & MyPwd & "','" & txtEmailid.Text & "','" & txtAdd1.Text & "','" & cmbState.SelectedItem.Text & "','" & txtCity.Text & "'," & txtPin.Text & ",'" & CmbTitle.SelectedItem.Text & "','" & txtFname.Text & "','" & txtLname.Text & "','" & cmbGender.SelectedItem.Text & "','" & BodDate.SelectedDate.Date & "'," & txtMobile.Text & ",'" & System.DateTime.Today & "')"
Comm.ExecuteNonQuery()
Conn.Close()
Adpt = New Data.SqlClient.SqlDataAdapter("select * from customer", Conn)
Dataset1 = New Data.DataSet
Adpt.Fill(Dataset1, "customer")
EmptyControls()
Else
'EmptyControls()
lblMessage.Visible = True
lblMessage.Text = "Try Again !.....Password and Confirm Password is not Match"
End If
Thanks in advance
Plz solve my problem as early as possible
Shah Shishir
Plz anybody convert my code from vb to c#
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Niradhip ChakrabortyRank #428 · 5.8K pointsPosted Oct 3, 2008, 3:21 AM EDT
vivek garg4 pointsPosted Oct 3, 2008, 9:49 AM EDT
To Convert VB.NET to C# use below link
http://www.developerfusion.com/tools/convert/vb-to-csharp/
Similar there is link who convert C# to Vb.net so you can use these links..