Repeater2_ItemCommand
Repeater2.DataBind()
protected void Repeater2_ItemCommand(object sender, RepeaterCommandEventArgs e) { lblMsg.Visible = false; TextBox tb = new TextBox(); id = e.CommandArgument.ToString(); column1 = ((TextBox)e.Item.FindControl("txtCol1")).Text.Trim(); column2 = ((TextBox)e.Item.FindControl("txtCol2")).Text.Trim()); cmd = new SqlCommand("update tab set col1=@col1,col2=@col2 where id=@id", con); cmd.Parameters.AddWithValue("@id", id); cmd.Parameters.AddWithValue("@col1", column1); cmd.Parameters.AddWithValue("@col2", column2); int rwcnt = cmd.ExecuteNonQuery(); Reapeter2.DataBind(); if (rwcnt <= 0) lblMsg.Visible = true; }
DataSource
Reapeter2.DataSource =source;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)