0
我是新來的asp.net。我想問問是否有方法來改變AutoGenerateSelectButton屬性的文本,我想要的是從我的數據庫顯示一些數據,而不是「選擇」文本顯示只。請幫忙嗎?下面在此先感謝更改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;
}
哦,我的女朋友,我花了很多時間來完成這項工作。我知道了!多謝了朋友。我沒有意識到使用這種控制/技術。我專注於上面顯示的代碼。再次感謝! – JennyJane
不客氣:-) – nunespascal