摘要: using System;using System.Collections.Generic;using System.Text;using System.Text.RegularExpressions;namespace DotNet.Utilities{ /// <summary> /// 字符串操作类 /// 1、GetStrArray(string str, char speater, bool toLower) 把字符串按照分隔符转换成 List /// 2、GetStrArray(string str) 把字符串转 按照, 分割 换为数据 /// 3、GetArraySt 阅读全文
posted @ 2012-10-26 00:05 蓬莱仙羽 阅读(858) 评论(0) 推荐(0) 编辑
摘要: #region set connection string strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source= "+this.txtPath.Text+";Extended Properties=Excel 8.0;"; myDataReader = null; craboDbConnection = new OleDbConnection(strConn); OleDbCommand myOleDbCommand = new OleDbCommand("SELECT * FROM 阅读全文
posted @ 2012-10-24 16:02 蓬莱仙羽 阅读(150) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Windows.Forms;namespace WindowsFormsApplication2{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Uri address = new Uri(textBox1.Text);//创建uri类型变量,存储浏览网页地址 webBrowser1.Url = address; } pr 阅读全文
posted @ 2012-10-23 21:42 蓬莱仙羽 阅读(148) 评论(0) 推荐(0) 编辑
摘要: protected void Upload() { //判断是否选择文件 if (FileUpload1.HasFile) { string fileContentType = FileUpload1.PostedFile.ContentType;//获取文件类型 //判断类型是否符合条件 if (fileContentType == "image/bmp" || fileContentType == "image/gif" || fileContentType == "image/pjpeg"||fileContentType==& 阅读全文
posted @ 2012-10-22 20:25 蓬莱仙羽 阅读(193) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;public partial class CalendarThree : System.Web. 阅读全文
posted @ 2012-10-22 16:30 蓬莱仙羽 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 如何运用内置对象session和application对象实现统计在线人数首先创建一个全局应用程序类Global.asaxprotected void Application_Start(object sender, EventArgs e) { if (Application["CountOnline"] == null) { Application["CountOnline"] = 0; } } //设置session对象,生存时间为1分钟 protected void Session_Start(object sender, EventArgs e 阅读全文
posted @ 2012-10-22 16:01 蓬莱仙羽 阅读(167) 评论(1) 推荐(0) 编辑
摘要: (一).Web.Config是以XML文件规范存储,配置文件分为以下格式 1.配置节处理程序声明 特点: 位于配置文件的顶部,包含在<configSections>标志中。 2.特定应用程序配置 特点: 位于<appSetting>中。 可以定义应用程序的全局常量设置等信息. 3.配置节设置 特点: 位于<system.Web>节中,控制Asp.net运行时的行为. 4.配置节组 特点: 用<sectionGroup>标记,可以自定义分组,可以放到<configSections>内部或其它<sectionGroup>标记的 阅读全文
posted @ 2012-10-22 15:09 蓬莱仙羽 阅读(154) 评论(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 蓬莱仙羽 阅读(125) 评论(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 蓬莱仙羽 阅读(165) 评论(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 蓬莱仙羽 阅读(157) 评论(0) 推荐(0) 编辑