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
Shah Shishir
NA
4
0
plz anybody convert my code from vb to c#
Oct 3 2008 3:42 AM
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
Reply
Answers (
1
)
How can I get the dates of all Sundays of the year 2009 using C#.net
plz anybody convert my code from vb to c#