易截截图软件、单文件、免安装、纯绿色、仅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 当前页 关闭 父类页

//在当前页中关闭
 Response.Write("<Script>window.opener.opener= null;window.opener.location.replace(window.opener.location.href='ideabank.aspx');window.close();</Script>");
//父类页打开 子页
 Response.Write("<script>window.open('upideabank.aspx?id="+id+"','','height=50 ......

asp.net发布网站


通常部属网站的时候需要编译那些需要的文件,和一些系统需要的组件。
会感觉到很繁琐。
发布网站是一个不错的选择:直接发布服务器上,设置好站点与端口即可。以下是总结的步骤。。。
第一、是将网站里所有的数据连接都做成从web.config中读取,这样的话,就可以一劳永逸了。
第二、就是IIS设置了,在IIS中的asp.net中 ......

ASP.NET


      应用程序状态是可供 ASP.NET 应用程序中的所有类使用的数据储存库。它存储在服务器的内存中,因此与在数据库中存储和检索信息相比,它的执行速度更快。与特定于单个用户会话的会话状态不同,应用程序状态应用于所有的用户和会话。因此,应用程序状态用于存储那些数量较少、不随用户的变化 ......

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号