
c#中带头(声明)的xml(封装)生成
XmlDocument downLoadFilexml = new XmlDocument(); XmlElement root = null; XmlElement kisokChild = null; //生成xml的头 XmlNode xmlnode= downLoadFilexml.CreateXmlDeclaration(“1.0”, “utf-8”, null); downLoadFilexml.AppendChild(xmlnode); root

asp.net Repeater之非常好的数据分页
副标题#e# 分页控件源代码如下: 复制代码 代码如下: using System; using System.Collections.Generic; using System.ComponentModel; using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Collect

asp.net 过滤图片标签的正则
public static string replaceImgUrl(string html) { if (html == null) return “”; System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex(@”\img[^\]+\”, System.Text.RegularExpressions.RegexOptions.IgnoreCase);

asp.net Linq To Xml上手Descendants、Elements遍历节点
首先准备一个简单但是常见的XML 复制代码 代码如下: ?xml version=”1.0″ encoding=”utf-8″ ? userSet userInfo profile phoneNumber13818181818/phoneNumber countryChina/country /profile /userInfo userInfo profile phoneNumber13919191919/phoneNumber

asp.net GridView导出到Excel代码
StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); HtmlTextWriter htw = new HtmlTextWriter(sw); Page page = new Page(); HtmlForm form = new HtmlForm(); GVLinkman.EnableViewState = false; page.EnableEventValid

php 三级联动菜单
— 表的结构 `bigclass` — CREATE TABLE `bigclass` ( `bigclassid` int(11) NOT NULL auto_increment, `bigclassname` varchar(200) collate utf8_unicode_ci NOT NULL, `sort` int(11) NOT NULL, `suoshu` int(1) NOT NULL, PRIMARY KEY (`bigclassid`)

asp.net 存储过程调用
1.调用存储过程,但无返回值 复制代码 代码如下: Private Function SqlProc1(ByVal ProcName As String) As Boolean ‘定义数据链接部分省略, myConn为链接对象 ProcName为存储过程名 Dim myCommand As New SqlClient.SqlCommand(ProcName, myConn) With my

asp.net 操作XML 按指定格式写入XML数据 WriteXml
Private Sub WriteXml() Try Create(strFName, “NewDataSet”) SaveXMLFile(“gg”, “NewDataSet”, True) Catch ex As Exception MsgBox(ex.Message) End Try End Sub Private Function Create(ByVal FileName As String, ByVal Root As String) As Boolean D

asp.net连接数据库 增加,修改,删除,查询代码
‘数据库连接 Public Sub connectionDB() Try serverUrl = readFromIni(My.Application.Info.DirectoryPath “\config.dll”, “Service Information”, “IPAddress”) serverID = readFromIni(My.Application.Info.DirectoryPath “\config.dll”, “Service Infor

VB.net 查询获取数据库数据信息
‘数据操作执行 Public Sub getConn(ByVal SqlStr As String, ByVal TableName As String) Try objCommand.CommandText = SqlStr objDataSet.Clear() objDataAdapter.SelectCommand = objCommand objDataAdapter.Fill(objDataSet, TableName) Catch ex As E