我是 asp.net 的新手。我想问一下是否有办法改变 AutoGenerateSelectButton 属性的文本,我想要的是从我的数据库中显示一些数据,而不是只显示“选择”文本。请问有什么帮助吗?提前致谢
下面是我的代码
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
Style="float: right" Width="675px" OnRowCommand="GridView1_RowCommand" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" AutoGenerateSelectButton="True" BorderStyle="Solid"
HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle">
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
txtFName.Text = GridView1.SelectedRow.Cells[2].Text;
txtFName.Enabled = false;
txtMName.Text = GridView1.SelectedRow.Cells[3].Text;
txtMName.Enabled = false;
txtLName.Text = GridView1.SelectedRow.Cells[4].Text;
txtLName.Enabled = false;
rbtnGender.Text = GridView1.SelectedRow.Cells[5].Text;
rbtnGender.Enabled = false;
rbtCStatus.Text = GridView1.SelectedRow.Cells[6].Text;
rbtCStatus.Enabled = false;
ddlBirthMonth.Text = GridView1.SelectedRow.Cells[7].Text;
ddlBirthMonth.Enabled = false;
ddlBirthDate.Text = GridView1.SelectedRow.Cells[8].Text;
ddlBirthDate.Enabled = false;
}