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
Venkata Subbareddy
997
770
99.3k
Additional information: Input string was not in a correct fo
May 26 2015 5:14 AM
Hi Every one,
Iam New Software Developer i write One Logic code But I got Small and simple Error where iam doing Wrong Find out Me And Modified my source code in the Below the My Source Code..
public void chkStatus_OnCheckedChanged(object sender, EventArgs e)
{
CheckBox chkStatus = (CheckBox)sender;
GridViewRow row = (GridViewRow)chkStatus.NamingContainer;
string UserName = row.Cells[5].ToString();
bool ApproveStatus = chkStatus.Checked;
string constr = @"Data Source=SERVER;Initial Catalog=MuraliIIT;User ID=sa;Password=rits@1234";
string query = "UPDATENewStudentRegistrationForm SET ApproveStstus = @ApprovedStatus WHERE UserName = @UserName";
SqlConnection con = new SqlConnection(constr);
SqlCommand com = new SqlCommand(query, con);
com.Parameters.Add("@ApproveStatus", SqlDbType.Bit).Value = ApproveStatus;
com.Parameters.Add("@UserName", SqlDbType.Char).Value = Convert.ToInt32(UserName);
con.Open();
com.ExecuteNonQuery();
con.Close();
Thanks &Regards,
subbareddy.
Reply
Answers (
17
)
Cash On delivry in ecommerce project
How to implement the OnlineExam using asp.net and sqlserver