I'm new to C# and got a problem in the very early stage.
I have a web service which I used to get data . So far, i am to retreive data from the database and put them to a GridView in another web site by add web reference.I bind it to a gridView.
Now I want to update data in the gridview . click on the edit and it allow me to edit in the gridview and click on update button to update it. However, I have no idea how to do that. Any help would be great.
All this is done in the visual studio
Any other alternatives would be nice too.
Thanks in advance
this is what i have create for update webmethod in web service
Method]
public DataSet updateRoll(int ID, String RollInfo, String UserName, String Password )
{
//Query = "UPDATE Roll SET UserName=@UserName, RollInfo=@RollInfo WHERE ID=@ID";
SqlCommand dbCommand = new SqlCommand();
dbCommand.CommandText = "UPDATE Roll SET UserName=@UserName, RollInfo=@RollInfo WHERE ID=@ID";
dbCommand.Connection = conn;
da = new SqlDataAdapter();
da.SelectCommand = dbCommand;
dbCommand.Parameters.AddWithValue("@ID", ID);
dbCommand.Parameters.AddWithValue("@RollInfo", ROllInfo);
dbCommand.Parameters.AddWithValue("@UserName", UserName);
dbCommand.Parameters.AddWithValue("@Password", Password);
DataSet ds = new DataSet();
da.Fill(ds);
return ds;
}
i not sure how to use this update web method in the webs service to the another website to update the gridview