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
相关文档:
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 ......
先看看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 ......
1、首先下载owc11:owc11(http://www.svnhost.cn/Download/Detail-60.shtml)
2、引用OWC:打开"解决方案资源管理器"面板,鼠标右键单击"引用",选择"添加引用"菜单,在弹出的"添加引用"对话框中单击"COM"卡片,找到"Microsoft Office Web Components 10.0(office 2003是11.0)",单击"选择"和"确定"按钮,OWC就被添加到了引 ......
//使用验证方法
if (!InputValidator(txt.Text.Trim()))
{
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "myScript", "alert('\"文本框\"输入了非法字符或输入超长!');", t ......
public static string GetCustomerCName(ref ArrayList arrayCName,ref ArrayList arrayID)
{
SqlConnection con=ADConnection.createConnection();
  ......