protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("style", "cursor:pointer");
e.Row.Attributes.Add("onclick", "document.getElementById('txtYiLiao2').value='" + Convert.ToString(DataBinder.Eval(e.Row.DataItem, "列名")) + "';document.getElementById('cbBaoXiao').Checked='" + Convert.ToString(DataBinder.Eval(e.Row.DataItem, "Ns")) + "';"); // UpdatePanel1.Visible = false;
}
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("style", "cursor:pointer");
e.Row.Attributes.Add("onclick", "document.getElementById('txtYiLiao2').value='" + Convert.ToString(DataBinder.Eval(e.Row.DataItem, "列名")) + "';document.getElementById('cbBaoXiao').Checked='" + Convert.ToString(DataBinder.Eval(e.Row.DataItem, "Ns")) + "';"); // UpdatePanel1.Visible = false;
}
在上面的方法里根据单击gridview行根据获得bit值 改变checkbox checked属性为true 或者false我现在textbox接收了一个true 怎么用checkbox接收