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
相关文档:
系统环境:Windows 7
软件环境:Visual C++ 2008 SP1 +SQL Server 2005
本次目的:编写一个航空管理系统
这是数据库课程设计的成果,虽然成绩不佳,但是作为我用VC++ 以来编写的最大程序还是传到网上,以供参考。用VC++ 做数据库设计并不容易,但也不是不可能。以下是我的程序界面,后面 ......
Dim strScript As String = "<Script Language='VBScript'>" &vbCrLf
strScript &= "opener.parent.document.location.href=""" &"../Individual/UserJobs.aspx?EntityTableID=" &Request("EntityTableID") &"&ListID=" &BLL.TableType.Entity &"&OrgID=" &Request ......
Public DataTable GetDataTablefromExcel(string fileName,string tableName )
{
string connStr = "Provider=Microsoft.ACE.OLEDB.12.0; Persist Security Info=False;Extended Properties=Excel 8.0; data source=文件路径"
string sql = "SELECT * from [" + tableName + "]";
OleDbConnection conn = ne ......
//使用验证方法
if (!InputValidator(txt.Text.Trim()))
{
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "myScript", "alert('\"文本框\"输入了非法字符或输入超长!');", t ......