当前页statues的值怎么取得!!

lang888 2003-08-21 02:26:52
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="manage_info.aspx.vb" Inherits="wolfvod.manage_info"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>manage_info</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<script language="vb" runat="server">






sub pagerbuttonclick(sender as object,e as eventargs)
dim arg as string =sender.commandargument

select arg
case "next"
if(DataGrid1.currentpageindex<(DataGrid1.pagecount-1)) then
DataGrid1.currentpageindex=DataGrid1.currentpageindex+1

end if
case "prev"
if(DataGrid1.currentpageindex>0) then
DataGrid1.currentpageindex=DataGrid1.currentpageindex-1
end if
case "last"
DataGrid1.currentpageindex=(DataGrid1.pagecount-1)

end select
DataGrid1.databind
end sub


</script>
<FORM id="Form1" method="post" runat="server" style="FONT-SIZE: x-small">
<FONT face="宋体">
<TABLE id="Table2" style="WIDTH: 301px; HEIGHT: 56px" cellSpacing="0" cellPadding="0" width="301" align="center" border="0">
<TR>
<TD style="WIDTH: 373px; HEIGHT: 41px" height="41"> 
<asp:Button id="Button2" runat="server" Text="《增 加》" Width="75px" Height="28px"></asp:Button> 
 
<asp:button id="Button1" runat="server" Text="《修 改》" Width="75px" Height="28px"></asp:button>  
<asp:Button id="Button4" runat="server" Text="《删 除》" Width="75px" Height="28px"></asp:Button></TD>
</TR>
</TABLE>
</FONT>
<TABLE id="Table3" style="WIDTH: 3px; HEIGHT: 151px" cellSpacing="0" cellPadding="0" width="3" align="center" border="0">
<TR>
<TD style="HEIGHT: 117px" vAlign="top"><FONT face="宋体">
<asp:datagrid id="DataGrid1" runat="server" Width="526px" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" BackColor="White" CellPadding="4" Font-Size="X-Small" AllowPaging="True">
<SelectedItemStyle Font-Bold="True" ForeColor="#CCFF99" BackColor="#009999"></SelectedItemStyle>
<ItemStyle ForeColor="#003399" BackColor="White"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="#CCCCFF" BackColor="#003399"></HeaderStyle>
<FooterStyle ForeColor="#003399" BackColor="#99CCCC"></FooterStyle>
<Columns>
<asp:TemplateColumn HeaderText="1" FooterText="1">
<HeaderTemplate>
状态
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox id="CheckBox1" runat="server"></asp:CheckBox>
</ItemTemplate>
<EditItemTemplate>
选择
</EditItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="#003399" BackColor="#99CCCC" Mode="NumericPages"></PagerStyle>
</asp:datagrid></FONT></TD>
</TR>
</TABLE>
当前页:<asp:label id="statues" runat="server" />
总页数:<asp:label id="pagecount" runat="server" />
<asp:linkbutton id="btnprev" runat="server" text="上一页" commandargument="prev" forecolor="navy" font-name="verdana" font-size="8pt" onclick="pagerbuttonclick" />
<asp:linkbutton id="btnnext" runat="server" text="下一页" commandargument="next" forecolor="navy" font-name="verdana" font-size="8pt" onclick="pagerbuttonclick" />
<asp:linkbutton id="btnlast" runat="server" text="到尾页" commandargument="last" forecolor="navy" font-name="verdana" font-size="8pt" onclick="pagerbuttonclick" />
</FORM>
</body>
</HTML>
...全文
59 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
yohomonkey 2003-08-22
  • 打赏
  • 举报
回复
不会啊!呵呵呵
一般默认的帮定页面index是0,就是第一页了,第二页是1,依次类推。
什么叫“为什么有时间的数字不准呢”?
lang888 2003-08-22
  • 打赏
  • 举报
回复
DataGrid1.CurrentPageIndex

为什么有时间的数字不准呢 》》》
yohomonkey 2003-08-21
  • 打赏
  • 举报
回复
对于使用分页的DG,可以用DataGrid1.CurrentPageIndex提取。
lang888 2003-08-21
  • 打赏
  • 举报
回复
再DATAGRID获得当前页码的值!!!
lang888 2003-08-21
  • 打赏
  • 举报
回复
再DATAGRID页码的值!
yohomonkey 2003-08-21
  • 打赏
  • 举报
回复
没有明白你的意思
是取label的值吗?
还是取页面的status的属性?
alert( window.defaultStatus);
lang888 2003-08-21
  • 打赏
  • 举报
回复
补充一句:

就是怎么获得当前页的值!

62,025

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧