摘要:
1、 protectedvoidGridView1_RowDataBound(objectsender,GridViewRowEventArgse){//如果是绑定数据行if(e.Row.RowType==DataControlRowType.DataRow){if(e.Row.RowState==DataControlRowState.Normal||e.Row.RowState==DataControlRowState.Alternate){((LinkButton)e.Row.Cells[9].Controls[0]).Attributes.Add("onclick" 阅读全文
摘要:
前台的代码:注意没有使用sqldatasource.net代码 <asp:GridViewID="GridView1"runat="server"AllowPaging="True"PageSize="6"OnRowDeleting="GridView1_deleting"AutoGenerateColumns="False"DataKeyNames="用户名"Width="819px"><Columns>< 阅读全文
摘要:
private void button1_Click(object sender, EventArgs e) { //点击按钮的时候只会显示一个窗体 bool opened = false; foreach (Form f1 in Application.OpenForms) { if (f1 is Form2) { opened = true; break;... 阅读全文