最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp.net中的一些数据绑定啦
时间:2008-01-18 编辑:简简单单 来源:一聚教程网
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace net2
{
///
/// WebForm5 的摘要说明。
///
public class WebForm5 : System.Web.UI.Page
{ //protected 保护类型。 要想在aspx哪个页面访问的时候就必须用到保护类型以上的 private估计是不行的
protected System.Web.UI.WebControls.DropDownList DropDownList1;
protected System.Web.UI.WebControls.ListBox ListBox1;
protected System.Web.UI.WebControls.RadioButtonList RadioButtonList1;
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Button Button1;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.Label Label4;
protected System.Web.UI.WebControls.CheckBoxList CheckBoxList1;
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
//一些WEB控件,如果没有选择它的值。然后又要取出它的值。那么它就会出错了
if (! IsPostBack)
{
//第一个是数组了
string[] str1 = new string[3]{"*","**","***"};//还有一个定义数组的方法 string[] str1= new string[3];str1[0]="";在初值化
//搞不懂是不是数组的意思。 中文也是可以在这边使用的
ArrayList 选项 = new ArrayList();
选项.Add("第一个");
选项.Add("第二个");
选项.Add("第三个");
选项.Add("第四个");
选项.Add("第五个");
//Hashtable 是不可以用排序的!
Hashtable HT = new Hashtable();
HT.Add("1","A");
HT.Add("2","B");
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace net2
{
///
/// WebForm5 的摘要说明。
///
public class WebForm5 : System.Web.UI.Page
{ //protected 保护类型。 要想在aspx哪个页面访问的时候就必须用到保护类型以上的 private估计是不行的
protected System.Web.UI.WebControls.DropDownList DropDownList1;
protected System.Web.UI.WebControls.ListBox ListBox1;
protected System.Web.UI.WebControls.RadioButtonList RadioButtonList1;
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Button Button1;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.Label Label4;
protected System.Web.UI.WebControls.CheckBoxList CheckBoxList1;
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
//一些WEB控件,如果没有选择它的值。然后又要取出它的值。那么它就会出错了
if (! IsPostBack)
{
//第一个是数组了
string[] str1 = new string[3]{"*","**","***"};//还有一个定义数组的方法 string[] str1= new string[3];str1[0]="";在初值化
//搞不懂是不是数组的意思。 中文也是可以在这边使用的
ArrayList 选项 = new ArrayList();
选项.Add("第一个");
选项.Add("第二个");
选项.Add("第三个");
选项.Add("第四个");
选项.Add("第五个");
//Hashtable 是不可以用排序的!
Hashtable HT = new Hashtable();
HT.Add("1","A");
HT.Add("2","B");
相关文章
- asp.net中Treeview数据绑定与动态增加节点示例 09-03
- asp.net中数据绑定几种方法介绍 04-13
- ASP.NET ListView中使用DropDownList绑定数据方法 05-11
- net入门教程:ASP.NET 数据绑定 11-04
- VBS 批量Ping的项目讲解 09-19
- 如何封装一个Ajax函数介绍 09-16