摘要:SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=nood;User=sa;Password=123"); SqlCommand comm = new SqlCommand("select * from tree_info", conn); conn.Open(); SqlDataReader reader = comm.ExecuteReader(); //新建XML文档 XmlDocument doc = new XmlDocument(); XmlElemen
阅读全文
摘要:■打开■ <input name=Button onClick=document.all.WebBrowser.ExecWB(1,1) type=button value=打开> <OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT> ■另存为■ <input name=Button onClick=document.all.WebBrowser.ExecWB(4,1) type=button value=另存
阅读全文
摘要:<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>无标题页</title> <script language ="javascript"> function aa() { window.opener = null; window.open('', '_self'); //关键的一步 window.parent.parent.close(); } <
阅读全文
摘要:<a onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.baidu.com/');" href="#">设为首页</a> |<a href="javascript:window.external.addFavorite('http://www.baidu.com','***系统');">收藏本站</a>|
阅读全文
摘要:<!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><meta http-equiv="Content-Type" content="text/html; charset=gb23
阅读全文
摘要:贴一段给你吧,这是如何使用视图资料中的一段,希望对你有所帮助。使用CREATE VIEW语句创建视图语法格式为:CREATE VIEW 视图名[(列名1,列名2[,…n])][WITH ENCRYPTION]]AS 查询语句[WITH CHECK OPTION]其中:l 列名 视图中包含的列,可以有多个列名,最多可引用1024个列。若使用与源表或视图中相同的列名时,则不必给出列名。l ENCRYPTION 说明在系统表syscomments中存储CREATE VIEW语句时进行加密。l 查询语句 用来创建视图的SELECT语句。可在SELECT语句中查询多个表或视图,以表明新创建的视图所参照的
阅读全文
摘要:在global文件 void Application_BeginRequest(object sender, EventArgs e)中添加如下代码: void Application_BeginRequest(object sender, EventArgs e) { //遍历Post参数,隐藏域除外 if (Regex.IsMatch(Request.RawUrl.ToLower(), @"/manager/")==false) for (int i=0; i < Request.Form.Count;i++) { if (Request.Form[i].ToSt
阅读全文
摘要:public class Encrypt{ /// <summary> /// 加密 /// </summary> /// <param name="str">待加密的明文字符串</param> /// <param name="key">密钥</param> /// <returns>加密后的字符串</returns> public static string EncryptString(string str, string key) { byte[] bS
阅读全文
摘要:public static class LogHelper{ public static string path = string.Empty; public static void WriteLog(Exception ex,HttpRequest Request) { Exception objErr = ex; string error = string.Empty; string errortime = string.Empty; string erroraddr = string.Empty; string errorinfo = string.Empty; string error
阅读全文
摘要:1.window.open(''url'')2.用自定义函数 <script> function openWin(tag,obj) { obj.target="_blank"; obj.href = "Web/Substation/Substation.aspx?stationno="+tag; obj.click(); } </script><a href="javascript:void(0)" onclick="openWin(3,this)"&g
阅读全文
摘要:XML文档<?xml version="1.0" encoding="utf-8" ?><Friends> <friend url="#">--友情链接--</friend><friend url="http://www.kingbase.com.cn/home/Default.aspx">北京人大金仓</friend><friend url="http://www.baidu.com">百度</frien
阅读全文
摘要:B/S结构导致了Web应用程序中打印的特殊性。 ? 程序运行在浏览器中,打印机在本地,而文件确可能在服务器上,导致了打印控制不是很灵活。 ? 格式如何控制和定制等,是我们开发中可能会面对的问题。 打印文档的生成 ? 1、客户端脚本方式 一般情况下,主要使用JS 可以分析源页面的内容,将欲打印的页面元素提取出来,实现打印。通过分析源文档的内容,可以生成打印目标文档。 优点:客户端独立完成打印目标文档的生成,减轻服务器负荷; 缺点:源文档的分析操作复杂,并且源文档中的打印内容要有约定。 ? 2、服务器端程序方式 利用后台代码从数据库中读取打印源,生成打印目标文档。当的页面生成时,还应适当考虑使用C
阅读全文