.net中for循环的使用
来源:互联网 发布:淘宝客小程序源码 编辑:程序博客网 时间:2024/06/10 14:56
<%@ Page Language="c#" %>
<script runat="server">
void Page_Load()
{
int number, counter;
if (Page.IsPostBack) {
number = Convert.ToInt32(NumberAttendees.SelectedItem.Value);
Message1.Text = "";
for (counter = 0; counter < number; counter ++)
{
Message1.Text += "Attendee Name ___________________<br /><br />" +
"Attendee Age _________________<br /><br /><hr /><br />";
}
}
}
</script>
<html>
<head>
<title>Loop Example</title>
</head>
<body>
<form runat="server">
Enter the number of attendees(max 6):
<br />
<br />
<asp:dropdownlist id="NumberAttendees" runat="server">
<asp:listitem>1</asp:listitem>
<asp:listitem>2</asp:listitem>
<asp:listitem>3</asp:listitem>
<asp:listitem>4</asp:listitem>
<asp:listitem>5</asp:listitem>
<asp:listitem>6</asp:listitem>
</asp:dropdownlist>
<br />
<br />
<input type="submit" value="提交查询内容" />
<br />
<br />
<asp:Label id="Message1" runat="server"></asp:Label>
</form>
</body>
</html>
<script runat="server">
void Page_Load()
{
int number, counter;
if (Page.IsPostBack) {
number = Convert.ToInt32(NumberAttendees.SelectedItem.Value);
Message1.Text = "";
for (counter = 0; counter < number; counter ++)
{
Message1.Text += "Attendee Name ___________________<br /><br />" +
"Attendee Age _________________<br /><br /><hr /><br />";
}
}
}
</script>
<html>
<head>
<title>Loop Example</title>
</head>
<body>
<form runat="server">
Enter the number of attendees(max 6):
<br />
<br />
<asp:dropdownlist id="NumberAttendees" runat="server">
<asp:listitem>1</asp:listitem>
<asp:listitem>2</asp:listitem>
<asp:listitem>3</asp:listitem>
<asp:listitem>4</asp:listitem>
<asp:listitem>5</asp:listitem>
<asp:listitem>6</asp:listitem>
</asp:dropdownlist>
<br />
<br />
<input type="submit" value="提交查询内容" />
<br />
<br />
<asp:Label id="Message1" runat="server"></asp:Label>
</form>
</body>
</html>
- .net中for循环的使用
- django中for循环的使用
- matlab 中for循环的使用
- Shell Script中FOR循环的使用
- django中for循环的使用
- Java中For-Each循环的使用
- java中for循环的使用
- verilog中for循环的转化使用
- for循环的使用
- oracle中使用for循环
- shell中for循环使用
- 关于在DELPHI中FOR循环语句的使用问题
- C#中Random()在for循环内使用的困惑
- shell中for循环的使用 (ex22.sh)
- C#中for循环使用的小例子
- 批处理中for循环使用的一些误区
- js 中for in循环方法的使用
- 关于javascript中for/in循环的标签使用
- .net中函数的使用实例
- .net中if和else的使用
- .net中函数介绍实例2
- 互动平台开发笔记 2005-3-15
- 清晰性和可测试性的权衡
- .net中for循环的使用
- VC中实现多格式图像的灵活转换
- Struts学习 错误:exception: cannot find actionmappings or actionformbeans collection
- .net中swith,case开关语句的使用
- 早上的时候发现生活的残酷!
- WINDOW自带工具.
- .net中使用while语句的使用
- MapXtreme2004代码 几个地图工具的使用(C#)
- eclipse 下配置jboss3.22