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

ASP.NET中treeview应用(用SQL作数据源)


treeview.aspx中代码如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="treeview.aspx.cs" Inherits="treeview" %>
<!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>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TreeView ID="TreeView1" runat="server" ImageSet="Msdn" NodeIndent="10">
            <ParentNodeStyle Font-Bold="False" />
            <HoverNodeStyle BackColor="#CCCCCC" BorderColor="#888888" BorderStyle="Solid" Font-Underline="True" />
            <SelectedNodeStyle BackColor="White" BorderColor="#888888" BorderStyle="Solid" BorderWidth="1px"
                Font-Underline="False" HorizontalPadding="3px" VerticalPadding="1px" />
            <NodeStyle Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" HorizontalPadding="5px"
                NodeSpacing="1px" VerticalPadding="2px" />
        </asp:TreeView>
   
    </div>
    </form>
</body>
</html>
 
 
treeview.aspx.cs中代码如下:
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 Sy


相关文档:

sql server日期时间函数

Sql Server中的日期与时间函数
1.  当前系统日期、时间
    select getdate() 
2. dateadd  在向指定日期加上一段时间的基础上,返回新的 datetime 值
   例如:向日期加上2天
   select dateadd(day,2,'2004-10-15')  --返回:2004-10-17 00:00:00.000 ......

ASP.NET页面刷新的实现方法

先看看ASP.NET页面刷新的实现方法:
第一:
private void Button1_Click( object sender, System.EventArgs e ) { Response.Redirect( Request.Url.ToString( ) ); } 第二:
private void Button2_Click( object sender, System.EventArgs e ) { Response.Write( " < script language=javascript>window.locatio ......

ASP.NET中防止页面多次提交的代码

此处提供的代码用来实现当asp.net页面中的某个Button被点击后disable掉该页面中所有的Button,从而防止提交延时导致的多次提交。基于之前的onceclickbutton脚本.
//ASP.NET中防止页面多次提交的代码:javascript< script language="javascript"> < !-- function disableOtherSubmit() {
var obj = event.srcElem ......

[Asp.Net]数据库连接字符串大全(转)

SQL服务器 ODBC连接方式
标准安全连接
Driver={SQL Server};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
信任连接
Driver={SQL Server};Server=myServerAddress;Database=myDataBase;Trusted_Connection=Yes;
提示输入用户名和密码方式
这个有一点问题,首先你需要设置一个Pro ......

ASP.NET调用存储过程

        public static string GetCustomerCName(ref ArrayList arrayCName,ref ArrayList arrayID)
        {
            SqlConnection con=ADConnection.createConnection();
  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号