-
asp.net连接数据库 增加,修改,删除,查询代码
所属栏目:[Asp教程] 日期:2021-07-25 热度:115
'数据库连接 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-25 热度:88
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-25 热度:71
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-25 热度:194
-- 表的结构 `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-25 热度:118
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 SharpZipLib的压缩与解压问题
所属栏目:[Asp教程] 日期:2021-07-24 热度:76
我使用SharpZipLib.dll中遇到的问题是:利用SharpZipLib压缩后生成的*.rar文件,利用其可以正常解压,但如果使用文件右击压缩生成的*.RAR文件,在解压过程中出错,具体报错信息:Wrong Local header signature: 0x21726152 ;但*.zip文件可正常解压。 具体压[详细]
-
asp.net jQuery Ajax用户登录功能的实现
所属栏目:[Asp教程] 日期:2021-07-24 热度:100
主页面调用代码片段: 复制代码 代码如下: asp:HyperLink runat="server" NavigateUrl="#" 登录/asp:HyperLink script language="javascript" type="text/javascript" $('#%=this.lnkLogin.ClientID %').click( function(){ jBox.open('iframe-jBoxID','ifr[详细]
-
asp.net Ext grid 显示列表
所属栏目:[Asp教程] 日期:2021-07-24 热度:182
%@ Page Language="C#" AutoEventWireup="true" CodeBehind="gridShowTest.aspx.cs" Inherits="ExtPra.gridShowTest" % !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" html[详细]
-
ASP.NET Web Page应用深入探讨第1/2页
所属栏目:[Asp教程] 日期:2021-07-24 热度:193
副标题#e# 一、服务器脚本基础介绍 首先,我们先复习一下Web服务器页面的基本执行方式: 1、客户端通过在浏览器的地址栏敲入地址来发送请求到服务器端 2、服务器接收到请求之后,发给相应的服务器端页面(也就是脚本)来执行,脚本产生客户端的响应,发送回[详细]
-
浅谈ASP.NET的Postback 实例代码第1/2页
所属栏目:[Asp教程] 日期:2021-07-24 热度:61
我们知道,无论是ASP.NET1.x,2.0,甚至是以后的版本,ASP.NET最终Render到Client端通过浏览器浏览的都是一样:一个单纯的HTML。Client通过Submit Form的方式将填入Form的数据提交给Server进行处理。我们现在来看看ASP.NET整个Postback程序处理的过程。 首先[详细]
-
asp.net js模拟Button点击事件
所属栏目:[Asp教程] 日期:2021-07-24 热度:61
script type="text/javascript" ///模拟按钮点击事件,插入数据 function addTmpDataApp() { document.%=formCC.ClientID %.%=btnjh.ClientID %.click(); } /script 这有时候是无法执行模拟点击的. 需要加上一句代码就可以了. 复制代码 代码如下: script t[详细]
-
asp.net datalist 用法
所属栏目:[Asp教程] 日期:2021-07-24 热度:53
设计模版: 页眉 HeaderTemplate /HeaderTemplate 页脚 FooterTemplate /FooterTemplate 数据记录 ItemTemplate /ItemTemplate AlternatingItemTemplate 交替显示项 /AlternatingItemTemplate SelectedItemTemplate选中时的显示方式 /SelectedItemTemplate[详细]
-
使用母版页时内容页如何使用css和javascript
所属栏目:[Asp教程] 日期:2021-07-24 热度:98
好处有了,问题也接着来了。原来在频道页和列表页中有其各自的css引入和一些javascript函数,当使用母版页时,放在内容页中这些css样式和javascript函数怎么处理呢?因为大家知道,使用母版页的内容页是不能包含head/head标记的,而css和javascript函数的声[详细]
-
ASP.NET 服务器路径和一般资源调用
所属栏目:[Asp教程] 日期:2021-07-23 热度:190
%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadioButtonListDemo.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 xmlns=[详细]
-
常用JavaScript代码提示公共类封装
所属栏目:[Asp教程] 日期:2021-07-23 热度:55
using System; using System.Web; namespace Jake.PublicJS { /// summary /// Summary description for PublicJS /// /summary public class PublicJS { public PublicJS() { // // TODO: Add constructor logic here // } /// summary /// 1.静态方法,弹[详细]
-
C# 生转换网页为pdf
所属栏目:[Asp教程] 日期:2021-07-23 热度:188
从htm生成pdf大概可以分两步实现,第一步,解析htm,就是将htm源文件中那一对文本转换为浏览器最终呈现给我们那种图文并茂的结果。这是一个不可完成的任务,因为目前为止业界的软件巨头也没有谁把htm解析做得很好的。对比ie、firefox等浏览器的显示结果便可[详细]
-
一个简单的自定义程序日志小样例
所属栏目:[Asp教程] 日期:2021-07-23 热度:183
using System; using System.IO; using System.Text; public class LogInfo { private string ErrorInfo_User = ""; // 记录用户自定义错误信息 private string ErrorPosition = ""; // 记录错误的位置信息,可包括类、函数等 private string ErrorInfo_Sy[详细]
-
asp.net 多数据库支持的思考
所属栏目:[Asp教程] 日期:2021-07-23 热度:161
一般的多数据库支持在配置文件中如下: 复制代码 代码如下: connectionStrings add connectionString="server=(local);user id=sa;pwd=123456;database=mycms;"/ /connectionStrings 而数据库连接如下: 复制代码 代码如下: using System; using System.Col[详细]
-
asp.net BOF或EOF有一个是真,或者当前记录已被删除
所属栏目:[Asp教程] 日期:2021-07-23 热度:56
我们这时要做的就是在使用Recordset对象的moveNext 等方法之前先利用RecordsetCount属性判断一下数据库中的数据是否为空方法: 复制代码 代码如下: dim objRs as New Recordset dim objCn as New connection dim strSql as string objCn.ConnectionString="[详细]
-
c#中带头(声明)的xml(封装)生成
所属栏目:[Asp教程] 日期:2021-07-23 热度:172
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-23 热度:88
副标题#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-23 热度:143
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-23 热度:176
首先准备一个简单但是常见的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-21 热度:82
副标题#e# 本文介绍的菜单控件采用的css 和ul list来显示菜单,生成的html小,无需javascript支持,对大部分的浏览器都支持,除ie6要单独修改css也可以使其支持。 通过本文可以了解asp.net 控件的开发,及Composite设计模式的实际运用。 采用Composite设计[详细]
-
asp.net中url地址传送中文参数时的两种解决方案
所属栏目:[Asp教程] 日期:2021-07-21 热度:144
在Web.comfig中配置 是一样的: globalization requestEncoding="gb2312" responseEncoding="gb2312"/ 页面Header部分也都有 meta http-equiv="Content-Type" content="text/html; charset=gb2312" / 真是奇怪, 只好用了笨办法: 写参数: 复制代码 代码如[详细]

浙公网安备 33038102330456号