易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net 动态纵向菜单

 using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Common;
using System.Data.Common;
public partial class LeftMenu : System.Web.UI.Page
{
Database db = DatabaseFactory.CreateDatabase("sqlconstr2");
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
GVDataBind();
}
private void GVDataBind()
{
DbCommand dcmd = db.GetSqlStringCommand("select * from dbo.[Group] where UserID=0");
DataSet ds = db.ExecuteDataSet(dcmd);
this.GridView1.DataSource=ds.Tables[0];
this.GridView1.DataBind();
}
private void DLDataBind(DataList dl, int GID)
{

string sql = "SELECT [User].*,[GroupUser].GroupID from [GroupUser] INNER JOIN [User] ON [User].ID=[GroupUser].UserID WHERE GroupID=" + GID + "";
DbCommand dcmd = db.GetSqlStringCommand(sql);
DataSet ds = db.ExecuteDataSet(dcmd);
dl.DataSource = ds.Tables[0];
dl.DataBind();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
DataList dlUser = (DataList)e.Row.FindControl("DataList1");
if (dlUser != null)
{ ///绑定数据
DLDataBind(dlUser, Int32.Parse(this.GridView1.DataKeys[e.Row.RowIndex].Value.ToString()));
}
}
}

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LeftMenu.aspx.cs" Inherits="LeftMenu" %>
<!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 runat="server">
<title>无标题


相关文档:

ASP.NET


      ASP.NET 配置文件功能允许您存储简单(标量)值、集合和其他复杂类型,以及用户定义的类型。
 
1、属性定义信息
在配置文件中定义属性时,应指定将用于引用该属性的名称。例如,如果要存储邮政编码,则可以将属性命名为 PostalCode,然后可以获取属性值并将其设置为 Profile.Pos ......

ASP.NET


ASP.NET 配置文件功能与 ASP.NET 成员资格、ASP.NET 角色管理以及其他 ASP.NET 功能使用同一基于提供程序的结构。ASP.NET 配置文件功能是一个分层系统,其中配置文件功能的功能(提供类型化属性值并管理用户标识)与基础数据存储区分离。配置文件功能依赖于配置文件提供程序(数据提供程序)来执行存储和检索配置文件属性 ......

asp.net 基本语法

  一、委托
       (1) 委托时一种引用方法的类型,一旦为委托分配了方法,委托将与该方法具有完全相同的行为,委托方法的带哦用可以像
   其他方法一样,具有参数和返回值,
      如:   public delegate int PerformCa ......

asp.net中上传大文件

直接在ASP.net中上传大文件的方法.
方法一:在web.config中添加<httpRuntime maxRequestLength="100000" executionTimeout="45"/>
方法二:修改IIS配置文件windows->system32->inetsrv->metaBase.XML
方法三:
1.   httpHandler or HttpModule
a.在ASP.net进程处理request请求之前截获 ......

asp.net页面生命周期 各时期事件

using System;
using System.Collections.Specialized;
using System.Data;
using System.Configuration;
using System.Collections;
using System.IO;
using System.Threading;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebC ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号