内容列表页
 
2008-7-15 21:55:45
匹配非“非内容”的行的表达式应该写成:^(?!.*非内容).*$
 
2008-6-16 8:24:45
打开vs2005或vs2008,
新建网站,把ACCCESS数据库Copy到App_Data里,
拖"AccessDataSource"到窗口里,
配置数据源。。。
选择数据库
下一步
sql语句里是空的,点“查询生成器...”
弹出:

---------------------------
Microsoft Visual Studio
---------------------------
未将对象引用..
 
2008-6-11 12:05:48
  自2000年6月Microsoft公司发布.NET计划以来,使编程工作在业界中引起了一次划时代的革命。ASP.NET是.NET计划中的一个重要组成部分,其为Web应用程序开发人员提供了许多新特性,这些特性包括已编译的服务器端代码、一种将服务器端逻辑与客户端布局相分离的代码隐藏(code-behind)技术、可扩展的服务器端控件模型、设计数..
 
2008-5-21 10:48:40
1. 把Setup\setup.sdb文件中的
[Product Key]
T2CRQGDKBVW7KJR8C6CKXMW3D
改成
[Product Key]
PYHYPWXB3BB2CCMV9DX9VDY8T
2.安装完成后,在“控制面板”中启动“添加删除程序”,选中Vs2008,点击“更改、删除”,
输入序列号:PYHYP-WXB3B-B2CCM-V9DX9-VDY8T
注:
以上序列号为..
 
2008-4-23 20:53:17
    XmlDocument xmlDoc = new XmlDocument();
    xmlDoc.Load("bookstore.xml");
    //xmlDoc.LoadXml("");
    XmlNode root = xmlDoc.SelectSingleNode("bookstore");//查找
    XmlElement xe1 = xmlDoc.CreateElement("book");//创建一个节点
    xe1.SetAttribute("genre", "李赞红");//设置该节点genre属性
    xe1.SetAttribute("ISBN", "2-3631-4");//设置该节点ISBN属性

    XmlElement xesub1 = xmlDoc.CreateElement("title");
    xesub1.InnerText = "CS从入门到精通";//设置文本节点
    xe1.AppendChild(xesub1);//添加到节点中
    XmlElement xesub2 = xmlDoc.CreateElement("author");
    xesub2.InnerText = "候捷";
    xe1.AppendChild(xesub2);

    XmlElement xesub3 = xmlDoc.CreateElement("price");
    xesub3.InnerText = "58.3";
    xe1.AppendChild(xesub3);

    root.AppendChild(xe1);//添加到节点中
    xmlDoc.Save("bookstore.xml");
 
2008-4-23 13:31:55
string str="";
str += "\r\n" + System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
str += "\r\n" + System.Environment.CurrentDirectory;
str += "\r\n" + System.IO.Directory.GetCurrentDirectory();
str += "\r\n" + System.AppDomain.CurrentDomain.BaseDirectory;
str += "\r\n" + System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
str += "\r\n" + System.Windows.Forms.Application.StartupPath;
str += "\r\n" + System.Windows.Forms.Application.ExecutablePath;
Console.Write(str);
Console.ReadKey();
 
2008-4-23 10:03:15
第一种方法:
string s=abcdeabcdeabcde;
string[] sArray=s.Split('c') ;
foreach(string i in sArray)
  Console.WriteLine(i.ToString());
输出下面的结果:
ab
deab
deab
de
第二种方法:
我们看到了结果是以一个指定的字符进行的分割。使用另一种构造方法对多个字符进行分割:
string s="abcdeabcdeabcde"..
 
2008-4-18 16:19:26
//服务器重启服务,作者:柳永法 www.yongfa365.com
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.IO;
using System.Text;
using System.Timers;
 
2008-4-18 15:51:52
using System;
using System.Collections.Generic;

//int[]到string[]的转换
public class Example
{
static void Main()
{
int[] int_array = { 1, 2, 3 };

string[] str_array = Array.ConvertAll(int_array, new Converter<int, string>(IntToString));

foreach (string s in str_array)
{
Console.WriteLine(s);
}
Console.Read();
}

public static string IntToString(int i)
{
return i.ToString();
}
}
 
2008-4-18 15:22:26

//演示

using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace 生成N个不重复随机数的两个函数
{
    class Program
    {
        static void Main(string[] args)
        {
            DateTime d1 = System.DateTime.Now;
            int[]..
 
2008-4-18 11:57:25
public static String[] RemoveDup(String[] myData)
{
    if (myData.Length > 0)
    {
        Array.Sort(myData);
        int size = 1; 
        for (int i = 1; i < myData.Length; i++)
            if (myData[i] != myData[i - 1])
                size++;
        String[] myTempData = new Str..
 
2008-4-11 11:52:11

//需要添加System.Drawing及System.Windows.Forms引用
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Windows.Forms;
namespace 网页截图
{
 class Program
 {
 [STAThread]
 static void Main(string[] args)
 {
 string url = "..
 
2008-4-11 11:38:17
昨天在调试一个:C#实现网页截图程序时出现下边这个提示
当前线程不在单线程单元中,因此无法实例化 ActiveX 控件“8856f961-340a-11d0-a96b-00c04fd705a2”。
一直找不出什么原因,本以为是命令行模式没法解决只能在form下操作,但怎么也想不明白,今天看一文章时突然看到
[STAThread] //这个跟线程有关,并..
 
2008-4-10 12:59:09

 
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
namespace 线程练习
{
 class Program
 {
 static void Main(string[] args)
 {
 Console.WriteLine("开始一个新的线程,名为次线程");
 Thread t = new Thread(new ThreadStart(ThreadProc))..
 
2008-4-7 17:13:32

 
//C#读取表某个表的字段
private void MSSQL_CONN()
{
 //MSSQLSQL标准连接方式
 string strConnection = "user id=sa;password=yongfa365;initial catalog=Northwind;Server=yongfa365;Connect Timeout=30";
 SqlConnection conn = new SqlConnection(strConnection);
 conn.Open();
 SqlComma..
 
   
 
 
文章分类
 
   

Power by :柳永法(yongfa365)'Blog | Model by :hibaidu | CSS by:众网友 | 京ICP备07011491号  QQ:64049027  E-mail:64049027qq.com

本空间赞助商:北京中科兴联信息技术有限公司