摘要: (一).Web.Config是以XML文件规范存储,配置文件分为以下格式 1.配置节处理程序声明 特点: 位于配置文件的顶部,包含在<configSections>标志中。 2.特定应用程序配置 特点: 位于<appSetting>中。 可以定义应用程序的全局常量设置等信息. 3.配置节设置 特点: 位于<system.Web>节中,控制Asp.net运行时的行为. 4.配置节组 特点: 用<sectionGroup>标记,可以自定义分组,可以放到<configSections>内部或其它<sectionGroup>标记的 阅读全文
posted @ 2012-10-22 15:09 蓬莱仙羽 阅读(176) 评论(0) 推荐(0)
摘要: Server.MapPath() ./当前目录/网站主目录../上层目录~/网站虚拟目录如果当前的网站目录为E:\wwwroot 应用程序虚拟目录为E:\wwwroot\company 浏览的页面路径为E:\wwwroot\company\news\show.asp在show.asp页面中使用Server.MapPath("./") 返回路径为:E:\wwwroot\company\newsServer.MapPath("/") 返回路径为:E:\wwwrootServer.MapPath("../") 返回路径为:E:\wwwroo 阅读全文
posted @ 2012-10-15 19:56 蓬莱仙羽 阅读(137) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.Net.Sockets;namespace SocketTest{ class Program { static void Main(string[] args) { int length; byte[] bytes = new byte[1024]; //创建一个Socket对象 Socket socketSend = new Socket(AddressFamily.I 阅读全文
posted @ 2012-10-13 16:58 蓬莱仙羽 阅读(176) 评论(0) 推荐(0)
摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="js.aspx.cs" Inherits="MYERP.js" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns= 阅读全文
posted @ 2012-09-22 20:17 蓬莱仙羽 阅读(169) 评论(0) 推荐(0)
摘要: <!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=UTF-8& 阅读全文
posted @ 2012-09-22 14:08 蓬莱仙羽 阅读(150) 评论(0) 推荐(0)
摘要: <!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=utf- 阅读全文
posted @ 2012-09-22 14:00 蓬莱仙羽 阅读(322) 评论(0) 推荐(0)
摘要: <!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=utf- 阅读全文
posted @ 2012-09-22 13:50 蓬莱仙羽 阅读(155) 评论(0) 推荐(0)
摘要: 过程一:select top N条记录 * from 文章表 where id not in(select top M条记录 id from 文章表 order by id desc ) order by id desc过程二:select top N条记录 * from 文章表 where id <(select min(id) from (select top M条记录 id from 文章表 order by id desc ) as tblTmp) order by id desc--简单通用CREATE PROCEDURE [dbo].[PageView] @select VA 阅读全文
posted @ 2012-09-21 20:26 蓬莱仙羽 阅读(135) 评论(0) 推荐(0)
摘要: 一.用SqlConnection连接SQL Server 1..加入命名空间 using System.Data.SqlClient; 2.连接数据库 SqlConnection myConnection = new SqlConnection(); myConnection.ConnectionString = "user id=sa;password=sinofindb;initial catalog=test;data source=127.0.0.1;Connect Timeout=30";myConnection.Open(); 改进(更通用)的方法: strin 阅读全文
posted @ 2012-08-29 17:17 蓬莱仙羽 阅读(126) 评论(0) 推荐(0)
摘要: 对话框中我们常用了以下几种:1、文件对话框(FileDialog)它又常用到两个: 打开文件对话框(OpenFileDialog) 保存文件对话(SaveFileDialog)2、字体对话框(FontDialog)3、颜色对话框(ColorDialog)4、打印预浏对话框(PrintPreviewDialog)5、页面设置(PrintDialog)6、打印对话框(PrintDialog) 还有更多,有时间的网友可以看看MSDN。下面我们一个个来介绍。在介绍的过程中我用到了一个自己开发的类:File,主要是文件操作的。 文件对话框(FileDialog) 一、打开文件对话框(Ope... 阅读全文
posted @ 2012-07-12 16:42 蓬莱仙羽 阅读(224) 评论(0) 推荐(0)