ASPxTreeList 代码绑定数据(ASP.NET第三方控件)
public void MyGetDepart()
{
string sSql = @"select DepartId,DepartName as '清华附中',ParentId from sDepart";
DataTable table = CommClass.GetDataTable(sSql);//BoolDAL.DbHelper.GetDataTable(sSql);
ASPxTreeList1.DataSource = table;
ASPxTreeList1.KeyFieldName = "DepartId";
ASPxTreeList1.ParentFieldName = "ParentId";
ASPxTreeList1.DataBind();
}
相关文档:
首页:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head ......
//private string datapatch = ConfigurationSettings.AppSettings["acessconn"];//数据库地址
private string datapatch = "db/global.asa";//数据库地址
///
/// 取得dataset
//
/// 查询语句
///
public DataSet GetDataSet(string Commandtext)
{&nbs ......
完成任何一个事情,目标和流程是我们首先要清晰的。
学习ASP.net技术也是这样,
我这里把ASP.net完全掌握需要的一个推荐学习流程告诉大家。
大家可以参考一下,有些不一定要完全掌握,但一定要了解了解。
等有了合理的知识结构,再来整体提高,有时候,可以融汇贯通,效果更好。
有啥学习上的问题,可以发群邮件问斯琴 ......
Asp.net常用的51个代码(非常实用)
1.//弹出对话框.点击转向指定页面
CODE:
Response.Write("<script>window.alert('该会员没有提交申请,请重新提交!')</script>");
Response.Write("<script>window.location ='http://www.51aspx.com/bizpulic/upmeb.aspx'</script&g ......
public string getip()
{
string result = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (null == result || result == String.Empty)
......