-
c#中带头(声明)的xml(封装)生成
所属栏目:[Asp教程] 日期:2021-07-24 热度:79
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之非常好的数据分页
所属栏目:[Asp教程] 日期:2021-07-24 热度:118
副标题#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 过滤图片标签的正则
所属栏目:[Asp教程] 日期:2021-07-24 热度:177
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遍历节点
所属栏目:[Asp教程] 日期:2021-07-24 热度:150
首先准备一个简单但是常见的XML 复制代码 代码如下: ?xml version="1.0" encoding="utf-8" ? userSet userInfo profile phoneNumber13818181818/phoneNumber countryChina/country /profile /userInfo userInfo profile phoneNumber13919191919/phoneNumber[详细]
-
asp.net 弹出警告窗口实现代码
所属栏目:[Asp教程] 日期:2021-07-23 热度:183
/// summary /// 提供一个可[详细]
-
asp.net 用户控件读取以及赋值
所属栏目:[Asp教程] 日期:2021-07-23 热度:143
?xml version="1.0" encoding="utf-8" ? SystemVersion Item Version_ID1/Version_ID Version_NameCN/Version_Name /Item Item Version_ID2/Version_ID Version_NameEN/Version_Name /Item /SystemVersion 用户控件的关键代码: SystemVersion.ascx 复制代[详细]
-
asp.net结合aspnetpager使用SQL2005的存储过程分页
所属栏目:[Asp教程] 日期:2021-07-23 热度:125
set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go ALTER PROCEDURE [dbo].[P_GetPagedReCord] (@startIndex INT, -- 开始索引号 @endindex INT, -- 结束索引号 @tblName varchar(255), -- 表名 @fldName varchar(255), -- 显示字段名 @OrderfldName varchar[详细]
-
ASP.NET 页面中动态增加的控件、添加事件第1/2页
所属栏目:[Asp教程] 日期:2021-07-23 热度:117
要求:页面上有一个Add按钮,每点击一次该按钮,页面上动态创建一个WebPartZone! 提醒:WebPartZone只能在OnInit或之前才能创建,否则报异常! 大家都知道,按钮的点击事件是在RaisePostbackEvent时触发的,这意味着点击事件在OnLoad阶段之后才执行,远远[详细]
-
VB.net 查询获取数据库数据信息
所属栏目:[Asp教程] 日期:2021-07-23 热度:59
'数据操作执行 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[详细]
-
asp.net连接数据库 增加,修改,删除,查询代码
所属栏目:[Asp教程] 日期:2021-07-23 热度:94
'数据库连接 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[详细]
-
asp.net 操作XML 按指定格式写入XML数据 WriteXml
所属栏目:[Asp教程] 日期:2021-07-23 热度:83
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 存储过程调用
所属栏目:[Asp教程] 日期:2021-07-23 热度:92
1.调用存储过程,但无返回值 复制代码 代码如下: Private Function SqlProc1(ByVal ProcName As String) As Boolean '定义数据链接部分省略, myConn为链接对象 ProcName为存储过程名 Dim myCommand As New SqlClient.SqlCommand(ProcName, myConn) With my[详细]
-
php 三级联动菜单
所属栏目:[Asp教程] 日期:2021-07-23 热度:119
-- 表的结构 `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 GridView导出到Excel代码
所属栏目:[Asp教程] 日期:2021-07-23 热度:66
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[详细]
-
ASP.NET技巧:做个DataList可分页的数据源
所属栏目:[Asp教程] 日期:2021-07-17 热度:164
这个数据源,分两部分,一是从数据类中调出数据,然后在本数据源中对分页参数以及页面分页辅助控件进行操作!在前面有三个控件控制翻页,一个下拉列表,两个LinkButton! 下面 fill() 方法调用很简单,在页面中要重新绑定的地方 写上 fill() 就可以了,呵[详细]
-
在ASP.net中保存/取出图片入/从SQL数据库
所属栏目:[Asp教程] 日期:2021-07-17 热度:139
一、把图片存入数据库中 用到以下几个方面的知识: 1. 使用流对象 2. 查找准备上传的图片的大小和类型 3.怎么使用InputStream方法 插入图片的必要条件 1.#Form 标记的 enctype 属性应该设置成 enctype="multipart/form-data" 2.# 需要一个input type=file[详细]
-
第一次用.net2.0 LOGIN登陆控件的困惑和解决方法
所属栏目:[Asp教程] 日期:2021-07-17 热度:111
副标题#e# 1、我们没有真正的服务器,我们只是租用了.net2.0 + SQLserver空间,SQL数据库名是固定的。 2、空间提供商不可能给我们设定数据源或给你aspnetdb数据库权限。 3、我们没有服务器的 WindowsMicrosoft.NetFrameworkv2.xConfig 权限。 已知上面[详细]
-
ewebeditor在.net的使用方法
所属栏目:[Asp教程] 日期:2021-07-17 热度:113
asp:textboxid="TextBox3"runat="server"CssClass="TextBox"/asp:textbox iframeid="eWebEditor1"src="editor/ewebeditor.asp?id=TextBox3style=s_light"frameBorder="0"width="550"scrolling="no"height="350"/iframe 隐藏TextBox的方法,利用CSS来控制[详细]
-
DataReader深入解析:持续更新
所属栏目:[Asp教程] 日期:2021-07-17 热度:139
//香水坏坏AT06-07-25 //郁闷的事情总是接连不断,无形的压力来自内心的恐惧 大家在用.net进行数据操作的时候,接触DataReader不少。 System.Data.OleDb.OleDbDataReader; System.Data.Odbc.OdbcDataReader; System.Data.SqlClient.SqlDataReader; inheritf[详细]
-
内容添加asp.net
所属栏目:[Asp教程] 日期:2021-07-17 热度:197
privatevoidButton1_Click(objectsender,System.EventArgse) { if(this.IsValid){ OleDbConnectionconn=dbconn.createconn(); conn.Open(); OleDbCommandcmd=newOleDbCommand(); cmd.CommandText="insertintoa(title,content)values('"+this.title.Text.Tri[详细]
-
VS2003 SP1发布
所属栏目:[Asp教程] 日期:2021-07-17 热度:189
文件名:VS7.1sp1-KB918007-X86.exe 版本:6030 发布日期:2006/8/17 语言:简体中文 下载大小:156.3MB 下载 更新列表查看 用了一上网,发现SP1还是非常值得推荐下载的 注意,安装非常慢,有假死情况 代码编辑器里对w3c标准支持很好了,呵呵,达到vs2005水[详细]
-
repeater分页 内容显示
所属栏目:[Asp教程] 日期:2021-07-17 热度:115
usingSystem; usingSystem.Collections; usingSystem.ComponentModel; usingSystem.Data; usingSystem.Drawing; usingSystem.Web; usingSystem.Web.SessionState; usingSystem.Web.UI; usingSystem.Web.UI.WebControls; usingSystem.Web.UI.HtmlControls; u[详细]
-
ASP.NET:ADO.NET的DataAdapter对象
所属栏目:[Asp教程] 日期:2021-07-17 热度:58
DataAdapter对象可以隐藏和Connection、Command对象沟通的细节,通过DataAdapter对象建立、初始化DataTable,从而和DataSet对象结合起来在内存存放数据表副本,实现离线式数据库操作,事实上在8.1.2节中,我们在介绍DataSet数据模型的时候就已经演示了如何[详细]
-
c#中过滤html的正则表达式
所属栏目:[Asp教程] 日期:2021-07-17 热度:190
/// summary/// 去除HTML标记/// /summary/// param name=”NoHTML”包括HTML的源码 /param/// returns已经去除后的文字/returnspublic static string NoHTML(string Htmlstring){ //删除脚本 Htmlstring = Regex.Replace(Htmlstring, @"script[^]*.*/scri[详细]
-
在ASP.NET中调用存储过程方法新解
所属栏目:[Asp教程] 日期:2021-07-17 热度:131
在使用.NET的过程中,数据库访问是一个很重要的部分,特别是在B/S系统的构建过程中,数据库操作几乎成为了一个必不可少的操作。调用存储过程实现数据库操作使很多程序员使用的方法,而且大多数的程序员都是能使用存储过程就使用存储过程,很少直接使用SQL语[详细]
