08 2010 档案
摘要:XML文件:<Persons><Person id="1"><Name>李一</Name><Sex>男</Sex></Person><Person id="2"><Name>李二</Name><Sex>女</Sex></Person><Person id="3"><Name>李三</Name><Sex>男</Sex><
阅读全文
摘要:ASP.NET页面输出XML(C#) private void Page_Load(object sender, System.EventArgs e) { // 在此处放置用户代码以初始化页面 XmlDocument ObjXML = new XmlDocument();//创建XMLDOCUMENT对象 XmlElement root = ObjXML.CreateElement("root");//创建根节点对象 ObjXML.AppendChild(root);//插入根节点 XmlElement user = ObjXML.CreateElement("
阅读全文
摘要:string sql = "SELECT id,name FROM content FOR XML AUTO,XMLDATA"; SqlConnection conn =new SqlConnection( System.Configuration.ConfigurationSettings.AppSettings["testDataBase"] ); SqlCommand cmd=new SqlCommand(sql,conn); conn.Open(); XmlTextReader objXmlReader = (XmlTextReader)cmd.
阅读全文
摘要:程序实现功能:1.读取数据,点解“获取”按钮动态生成XML格式的文档,并把生成的文档放在TEXTBOX或者生成一个XML文件。2.点击“浏览”按钮,把获取到的XML格式文档,转换成HTML,在浏览器中显示。首先在ASPX对应的CS文件中引入using System.Xml;int m = 0; int loop = 0;//根据指定的获取深度DEPTH获取用于生成XML文档的数据private int initData(string[] parent, string[] guid, string[] path, string[] name, ChannelCollection cc,int d
阅读全文
摘要:今天在写自己的CMS系统时,需要生成一个网站有KEY,其中一种方法就是让客户把生成的KEY直接下载后放到网站根目录下,这样主要是方便一些内网的网站。那怎样动态生成XML文档并提供下载呢?其他这种原理和生成EXECL一样。代码如下: int insertID=3; string domain="www.w17x.com"; string enddate="2009-12-1"; string Dcode="xlxcn"; string xml = "<key>\r\n" + @"<webi
阅读全文
摘要:网上有好多ASP.NET读取XML的例子,比如使用Dataset来读取,但本文教程却是使用XmlDocument来读取XML节点下所有数据,我们先来看下这个XML格式:SysRightsDb.xmlXML Code [http://www.xueit.com]<?xml version="1.0" encoding="utf-8" ?><root> <rights name="SYS"> <xml name="股票行情" code="stockmarket&quo
阅读全文
摘要:declare @i intset @i = 0while @i < 100begin update table set column = @i where ID_column = @i set @i = @i + 1end--游标实例 利用游标循环表 根据userid赋值alter PROCEDURE CURSOR_EG1ASBEGINdeclare @a int,@error int declare @temp varchar(50)--临时变量,用来保存游标值set @a=1 set @error=0BEGIN TRAN --申明事务--申明游标 为useriddeclare or
阅读全文
摘要:MaintainScrollPositionOnPostback="true"如内容超出单元格,则隐藏 style="TABLE-LAYOUT: fixed"让弹出窗口总是在最上面: <body onblur="this.focus();">不要滚动条? 让竖条没有: <body style='overflow:scroll;overflow-y:hidden'> </body>让横条没有: <body style='overflow:scroll;overflow-x
阅读全文
摘要:private DataSet InExecl() { //string filename = get.filenames; //string filename =get.filenames ; string filename = Label23.Text; DataSet ds = new DataSet(); string connStr = "Provider=Microsoft.Ace.OleDb.12.0;Data Source=" + Server.MapPath("up_product_store" + "\\" + f
阅读全文
摘要:SELECT TOP 100 PERCENT MAX(DISTINCT id) AS id, product_no, color, color2, product_type, SUM(number4) AS number, SUM(CASE WHEN ((product_size = '34' AND product_class = '女鞋') OR (product_size = '38' AND product_class = '男鞋') OR (product_class NOT IN ('女鞋', '
阅读全文
摘要:.NET 读取Excel 2007的xlsx文件和读取老的.xls文件是一样的,都是用Oledb读取,仅仅连接字符串不同而已。读取xlsx 用的是Microsoft.Ace.OleDb.12.0;具体操作方法如下:public static DataTable GetExcelToDataTableBySheet(string FileFullPath, string SheetName){ //string strConn = "Provider=Microsoft.Jet.OleDb.4.0;" + "data source=" + FileFull
阅读全文
摘要:<html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <body> <center> <FIELDSET ID=shop style="width:200;"> <legend><span style="fon
阅读全文
摘要:<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>CSS美化表格</title></head><style type="text/css">body { font: normal 11px auto "Trebuchet MS
阅读全文
摘要:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xml
阅读全文
摘要:foreach (Control c in Page.Controls) { foreach (Control childc in c.Controls) { if (childc is LinkButton) { string pp = ((LinkButton)childc).Text; //Response.Write(pp ); try { //((LinkButton)childc).Text = (int.Parse(((LinkButton)childc).Text) + 10).ToString(); int pp2 = int.Parse(((LinkButton)chil.
阅读全文
摘要:快速预览:GridView无代码分页排序GridView选中,编辑,取消,删除GridView正反双向排序GridView和下拉菜单DropDownList结合GridView和CheckBox结合鼠标移到GridView某一行时改变该行的背景色方法一鼠标移到GridView某一行时改变该行的背景色方法二GridView实现删除时弹出确认对话框GridView实现自动编号GridView实现自定义时间货币等字符串格式GridView实现用“...”代替超长字符串GridView一般换行与强制换行GridView显示隐藏某一列GridView弹出新页面/弹出新窗口GridView固定表头(不用j
阅读全文
摘要:1)10表示间隔10秒刷新一次2)<script>window.location.reload(true);</script>如果是你要刷新某一个iframe就把window给换成frame的名字或ID号3)<script>window.navigate("本页面url");</script>4>function abc(){window.location.href="/blog/window.location.href";setTimeout("abc()",10000);} 刷
阅读全文
摘要:给一个网址传递参数,并接收返回的参数。 public string SendMsg(string user,string password,string phone,string text) { try { //if (!Regex.IsMatch(phone, @"^(13|15)\d{9}$")) // return "手机号码格式错误!"; string url = "http://www.xunsai.net:8000/"; string param = "user=" + user+ "&
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1--/*-----存储过程 分页处理 孙伟 2005-03-28创建 -------*/ 2--/*-----存储过程 分页处理 浪尘 2008-9-1修改----------*/ 3--/*----- 对数据进行了2分处理使查询前半部分数据与查询后半部分数据性能相同 -------*/ 4 5alter PROCEDURE proc_paged_2part_selectMax 6( 7@
阅读全文
摘要:1 using System;2 using System.Data;3 using System.Configuration;4 using System.Collections;5 using System.Web;6 using System.Web.Security;7 using System.Web.UI;8 using System.Web.UI.WebControls;9 using System.Web.UI.WebControls.WebParts;10 using System.Web.UI.HtmlControls;11 12 public partial class
阅读全文
摘要:CREATE PROCEDURE search_sp@tblName varchar(255), -- 表名 @strGetFields varchar(1000) = '*', -- 需要返回的列 @fldName varchar(255)='', -- 排序的字段名 @PageSize int = 10, -- 页尺寸 @PageIndex int = '', -- 页码 @doCount bit = 0, -- 返回记录总数, 非 0 值则返回 @OrderType bit = '', -- 设置排序类型, 非 0 值则降序
阅读全文
摘要:public static bool AddOfficialCaseRegisters(string path)//选择导出的路径 { List<DataTable> dt = GetLeadinExcel(path); int z = 0; for (int i = 2; i < dt[0].Rows.Count; i++) { string sql1 = string.Format("select * from OfficialCaseRegisters where Identitycard='{0}' and FillTime='{1}
阅读全文