*.aspx 中<%# DataBinder.Eval(Container.DataItem, "序号")%>得不到值
*.aspx.cs中private void MyList_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) 事件不执行,请问是怎么回事?
上面问题是在加入分页后才出现的
*.aspx.cs中private void MyList_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) 事件不执行,请问是怎么回事?
上面问题是在加入分页后才出现的
解决方案 »
- 怎么给水晶报表绑定数据?
- TextBox怎么用正则表达式验证全角输入
- asp.net新手求助
- asp.net 邮件发送失败 (跪求大家来帮帮我啊)
- 向网55请问如何生成注册码
- 如何将用GDI+绘制好的统计图表导入到Excel中
- 在线等! 如何动态设置Lable的属性
- 鄙人想问:web.config如何配置才能使用户关闭窗口后session就没有了,程序中如何取得用户ID的session?谢谢!
- What's New in the .NET Framework 1.1
- 有鬼了,判断语句也会出错,大家来看看!
- DataGrid求助
- 单击button根据listbox中的项向div中动态添加控件。为什么在单击另一个button时,先前添加的控件都不见了。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>manage_rol</title>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:label id="Label1" style="Z-INDEX: 119; LEFT: 40px; POSITION: absolute; TOP: 56px" runat="server"
Height="16px" Width="72px">发布者:</asp:label><asp:button id="Button3" style="Z-INDEX: 123; LEFT: 152px; POSITION: absolute; TOP: 232px" runat="server"
Height="24px" Width="88px" Text="取消所选"></asp:button><asp:button id="Button2" style="Z-INDEX: 122; LEFT: 240px; POSITION: absolute; TOP: 232px" runat="server"
Height="24px" Width="88px" Text="删除所选"></asp:button><asp:textbox id="TextBox1" style="Z-INDEX: 101; LEFT: 104px; POSITION: absolute; TOP: 56px" runat="server"
Height="16px" Width="104px"></asp:textbox><asp:label id="Label2" style="Z-INDEX: 102; LEFT: 224px; POSITION: absolute; TOP: 56px" runat="server"
Height="8px" Width="48px">名称:</asp:label><asp:textbox id="TextBox2" style="Z-INDEX: 103; LEFT: 272px; POSITION: absolute; TOP: 56px" runat="server"
Height="16px" Width="224px"></asp:textbox><asp:label id="Label3" style="Z-INDEX: 104; LEFT: 512px; POSITION: absolute; TOP: 56px" runat="server"
Height="16px" Width="80px">是否发布:</asp:label><asp:dropdownlist id="DropDownList1" style="Z-INDEX: 105; LEFT: 608px; POSITION: absolute; TOP: 56px"
runat="server" Height="32px" Width="112px"></asp:dropdownlist><asp:label id="Label4" style="Z-INDEX: 106; LEFT: 32px; POSITION: absolute; TOP: 104px" runat="server"
Height="24px" Width="96px">发布时间段:</asp:label><asp:dropdownlist id="DropDownList2" style="Z-INDEX: 107; LEFT: 128px; POSITION: absolute; TOP: 104px"
runat="server" Height="32px" Width="56px">
<asp:ListItem Value="2005">2005</asp:ListItem>
</asp:dropdownlist><asp:label id="Label5" style="Z-INDEX: 108; LEFT: 192px; POSITION: absolute; TOP: 104px" runat="server"
Height="24px" Width="24px">年</asp:label><asp:dropdownlist id="DropDownList3" style="Z-INDEX: 109; LEFT: 224px; POSITION: absolute; TOP: 104px"
runat="server" Height="24px" Width="40px">
<asp:ListItem Value="11">11</asp:ListItem>
</asp:dropdownlist><asp:label id="Label6" style="Z-INDEX: 110; LEFT: 272px; POSITION: absolute; TOP: 104px" runat="server"
Height="24px" Width="24px">月</asp:label><asp:dropdownlist id="DropDownList4" style="Z-INDEX: 111; LEFT: 296px; POSITION: absolute; TOP: 104px"
runat="server" Height="24px" Width="40px">
<asp:ListItem Value="11">11</asp:ListItem>
</asp:dropdownlist><asp:label id="Label7" style="Z-INDEX: 112; LEFT: 344px; POSITION: absolute; TOP: 104px" runat="server"
Height="24px" Width="120px">日 ===>到< ===</asp:label><asp:dropdownlist id="DropDownList5" style="Z-INDEX: 113; LEFT: 472px; POSITION: absolute; TOP: 104px"
runat="server" Height="24px" Width="72px">
<asp:ListItem Value="2005">2005</asp:ListItem>
</asp:dropdownlist><asp:label id="Label8" style="Z-INDEX: 114; LEFT: 552px; POSITION: absolute; TOP: 104px" runat="server"
Height="24px" Width="24px">年</asp:label><asp:dropdownlist id="DropDownList6" style="Z-INDEX: 115; LEFT: 576px; POSITION: absolute; TOP: 104px"
runat="server" Height="24px" Width="48px">
<asp:ListItem Value="11">11</asp:ListItem>
</asp:dropdownlist><asp:label id="Label9" style="Z-INDEX: 116; LEFT: 632px; POSITION: absolute; TOP: 104px" runat="server"
Height="24px" Width="24px">月</asp:label><asp:dropdownlist id="DropDownList7" style="Z-INDEX: 117; LEFT: 656px; POSITION: absolute; TOP: 104px"
runat="server" Height="24px" Width="40px">
<asp:ListItem Value="11">11</asp:ListItem>
</asp:dropdownlist><asp:label id="Label10" style="Z-INDEX: 118; LEFT: 696px; POSITION: absolute; TOP: 104px" runat="server"
Height="24px" Width="16px">日</asp:label><asp:datagrid id="MyList" style="Z-INDEX: 120; LEFT: 64px; POSITION: absolute; TOP: 144px" runat="server"
Width="656px" AllowPaging="True" PageSize="2" AutoGenerateColumns="False">
<SelectedItemStyle Font-Size="9pt" Font-Names="宋体"></SelectedItemStyle>
<EditItemStyle Font-Size="9pt" Font-Names="宋体" Font-Bold="True" ForeColor="Red" BackColor="Info"></EditItemStyle>
<AlternatingItemStyle Font-Size="9pt" Font-Names="宋体" ForeColor="ControlText" BackColor="White"></AlternatingItemStyle>
<ItemStyle Font-Size="9pt" Font-Names="宋体" ForeColor="ControlText" BackColor="WhiteSmoke"></ItemStyle>
<HeaderStyle Font-Bold="True" HorizontalAlign="Center" ForeColor="Black" VerticalAlign="Middle"
BackColor="Control"></HeaderStyle>
<Columns>
<asp:TemplateColumn HeaderText="选择">
<HeaderStyle HorizontalAlign="Center" Width="50px"></HeaderStyle>
<ItemTemplate>
<asp:CheckBox id="chkExport" Runat="server"></asp:CheckBox>
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox id="chkExportON" Runat="server" Enabled="true"></asp:CheckBox>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField="序号" ReadOnly="True" HeaderText="序号">
<HeaderStyle Width="50px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="名称" ReadOnly="True" HeaderText="名称">
<HeaderStyle Width="50px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="发布者" ReadOnly="True" HeaderText="发布者">
<HeaderStyle Width="50px"></HeaderStyle>
</asp:BoundColumn>
<HeaderStyle Width="50px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="pub_w" ReadOnly="True" HeaderText="是否发布">
<HeaderStyle HorizontalAlign="Center" Width="50px"></HeaderStyle>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundColumn>
<asp:TemplateColumn>
<HeaderTemplate>
操作
</HeaderTemplate>
<ItemTemplate>
<a style="font-family: \000B; color: navy; text-decoration: none; text-underline: none; text-line-through: none"
href = "view_rol.aspx?id="'<%# DataBinder.Eval(Container.DataItem, "序号")%>'>查看</a> <a style="font-family: \000B; color: navy; text-decoration: none; text-underline: none; text-line-through: none"
href = "view_rol.aspx?id="'<%# DataBinder.Eval(Container.DataItem, "序号")%>'>修改</a>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Button id="btnDelete" runat="server" Text="删除" CommandName="Delete"></asp:Button>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid><asp:button id="Button1" style="Z-INDEX: 121; LEFT: 64px; POSITION: absolute; TOP: 232px" runat="server"
Height="24px" Width="88px" Text="选择所有"></asp:button>
<TABLE style="Z-INDEX: 124; LEFT: 48px; POSITION: absolute; TOP: 264px">
<tr>
<td colSpan="10" height="11"></td>
</tr>
<tr>
<td width="42" height="11">
<div align="right"><font size="2">>></font></div>
</td>
<td width="54" height="11">
<div align="center"><font color="#0000a0">分 页</font></div>
</td>
<td width="53" height="11">
<div align="center"><asp:linkbutton id="btnFirst" runat="server" Text="首 页" CommandArgument="First" Font-Name="verdana"
Font-size="8pt" OnCommand="PagerButtonClick" CommandName="Pager" ForeColor="navy"></asp:linkbutton></div>
</td>
<td width="53" height="11">
<div align="center"><asp:linkbutton id="btnPrev" runat="server" Text="上一页" CommandArgument="Prev" Font-Name="verdana"
Font-size="8pt" OnCommand="PagerButtonClick" CommandName="Pager" ForeColor="navy"></asp:linkbutton></div>
</td>
<td width="53" height="11">
<div align="center"><asp:linkbutton id="btnNext" runat="server" Text="下一页" CommandArgument="Next" Font-Name="verdana"
Font-size="8pt" OnCommand="PagerButtonClick" CommandName="Pager" ForeColor="navy"></asp:linkbutton></div>
</td>
<td width="53" height="11">
<div align="center"><asp:linkbutton id="btnLast" runat="server" Text="尾 页" CommandArgument="Last" Font-Name="verdana"
Font-size="8pt" OnCommand="PagerButtonClick" CommandName="Pager" ForeColor="navy"></asp:linkbutton></div>
</td>
<td width="54" height="11">
<div align="center"><font color="#0000a0">页 </font><font color="#ff0000">
<asp:label id="lblCurrentPage" runat="server"></asp:label></font>/ <font color="#ff0000">
<asp:label id="lblPageCount" runat="server"></asp:label></font></div>
</td>
<td width="73" height="11">
<div align="center"><font color="#0000a0">共<font color="#ff0000"><asp:label id="lblRecordCount" runat="server"></asp:label>
</font>条</font></div>
</td>
<td width="72" height="11">
<div align="center"><font color="#ff0000">10</font><font color="#0000a0">条记录/页</font></div>
</td>
<td width="112" height="11">
<div align="center"><font color="#0000a0">转到第
<asp:textbox id="txtIndex" runat="server" Width="20" ForeColor="#0000A0" Columns="2" OnTextChanged="txtIndex_Changed"
height="15" Font-Size="11px"></asp:textbox>页</font>
</div>
</td>
</tr>
</TABLE>
</form>
</body>
</HTML>
<asp:datagrid id="grd1" runat="server" OnSortCommand="Sort_Grid" AllowSorting="True" CssClass="Table" Width="100%" AllowPaging="True" BorderColor="#5A5A5A" PageSize="5">
<SelectedItemStyle CssClass="TableSelect"></SelectedItemStyle>
<AlternatingItemStyle CssClass="TableAltern"></AlternatingItemStyle>
<ItemStyle CssClass="TableItem"></ItemStyle>
<HeaderStyle CssClass="TableHead"></HeaderStyle>
<Columns>
<asp:TemplateColumn>
<HeaderStyle Width="30px"></HeaderStyle>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderTemplate>
<FONT size="2">选择</FONT>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox id=CheckBox1 Height="10px" ToolTip='<%# DataBinder.Eval(Container.DataItem,"单据编号") %>' Runat="server">
</asp:CheckBox>
<asp:Label ID="edit_billid" Visible=False Runat=server text='<%# DataBinder.Eval(Container.DataItem,"单据编号") %>'/>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle Visible="False" NextPageText="后页" Height="23px" PrevPageText="前页" HorizontalAlign="Center" CssClass="TablePage" Mode="NumericPages"></PagerStyle>
</asp:datagrid>