数据的绑定
来源:互联网 发布:vscode在插件 编辑:程序博客网 时间:2024/06/15 09:56
1.简单绑定:
绑定语法:<%#字段名或属性名%>
例如:
页面(前台):
<body style=‘<%#bodystyle%>’>…</body>
代码(后台):
protected string bodystyle;
protected void Page_Load(object sender, EventArgs e) {
bodystyle = "background-color:#ff0000";
2.复杂绑定:
手动添加:
this.DropDownList1.Items.Add(new ListItem("红色", "red"));
this.DataBind();
从数据库提取:
this.DropDownList1.DataSource=ds.Tables[0];
this.DropDownList1.DataTextField="name";
this.DropDownList1.DataValueField="id";
this.DropDownList1.DataBind();
- ListBox的数据绑定
- 有条件的数据绑定
- DropDownList 的数据绑定
- DataList的数据绑定
- dropdrownlist的数据绑定
- .NET的数据绑定
- Silverlight的数据绑定
- mapx的数据绑定。
- 数据的绑定DataBinder
- 绑定数据的问题
- mysql的数据绑定
- HyperLink 的数据绑定
- 数据的简单绑定
- 数据的绑定
- 数据绑定的例子
- DropDownList的绑定数据
- DataGrid的数据绑定
- GridView 的数据绑定
- 快速比较两字符串最大相同算法
- 算法导论——第五章——线性时间排序
- 数据绑定
- Permission Denial: starting Intent 解决办法 .
- 算法导论——第六章——中位数和顺序统计学
- 数据的绑定
- 深入理解按位异或运算符
- SQL Server数据类型的介绍
- How to make android app's background image repeat
- ubuntu安装使用tftp
- 排错:libstdc++.a: No such file: Permission denied
- asp.net数据绑定
- poj1028
- java abstract