自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(40)
  • 资源 (1)
  • 收藏
  • 关注

原创 frameset 使用心得

 最近在搞网页编程,总结了frameset 的一些使用技巧,供大家参考哦,还是先剖析一下框架吧!■ 框架标记           欲明白本篇【HTML彻底剖析】之标记分类,请看 【标记一览】。   也请先明白围堵标记与空标记的分别,请看 【HTML概念】。    ■ 框架概念 :  谓框架便是网页画面分成几个框窗,同时取得多个 URL。只需要 即可,面所有框架标记需要放在一个

2007-01-17 23:40:00 477

原创 .NET 做后台需要的

  function over(obj)  {   obj.style.color = #ff6600;   obj.style.backgroundColor = #f7f7f7;  }  function out(obj)  {   obj.style.color = ;   obj.style.backgroundColor = ;  }  function shift(id

2007-01-17 18:35:00 505

原创 NavButtons的理解

using System;using System.ComponentModel;using System.Web.UI;using System.Web.UI.WebControls;namespace MSPress.ServerControls {    [    DefaultEvent("ClickNext"),    DefaultProperty("NextText")    ]

2006-12-27 10:16:00 428

原创 优化事件实现 SimpleLinkButton

using System;using System.ComponentModel;using System.Web.UI;using System.Web.UI.WebControls;namespace MSPress.ServerControls {    [    DefaultEvent("Click"),    DefaultProperty("Text")     ]      p

2006-12-26 21:40:00 477

原创 回传事件映射到服务器端事件

using System;using System.ComponentModel;using System.Web.UI;using System.Web.UI.WebControls;namespace MSPress.ServerControls {    [    DefaultEvent("Click"),    DefaultProperty("Text")     ]      p

2006-12-25 14:37:00 547

转载 服务器控件基础知识(2)

应用示例  相信读者在浏览各个网站时,经常会看到"联系我们"等类似文字。当单击这些文字时,操作系统将自动打开自身所带的邮件客户端软件,提示用户发送邮件。本例将实现一个自定义服务器控件RenderContentsControl,其用于通过呈现包含"mailto:邮件地址"的超链接。本例的示例效果图如图1所示:550)this.width=550" border="1" />图1  如图1所示,页面中

2006-12-22 09:15:00 448

转载 服务器控件基础知识

基础知识  就服务器控件而言只存在两种情况:一种是具有外观可视化元素的控件,还有一种是不具有外观可视化元素的控件。如果需要开发的服务器控件包含可视化元素,那么多数情况下,建议开发人员创建继承自System.Web.UI.WebControls.WebControl基类的控件类。这种做法的主要原因是基于便捷性考虑。因为,WebControl类可提供服务器控件的部分与外观有关的公共属性、方法和事件等。

2006-12-22 09:13:00 423

原创 C# class 的可访问性

using System;using System.Collections.Generic;using System.Text;namespace myCar{    public class Car    {        public Car()        {        }        internal protected int Odometer = 0;        pub

2006-12-08 08:55:00 491

转载 asp.net程序中最常用的三十三种编程代码

 asp.net程序中最常用的三十三种编程代码,为初学者多多积累经验,为高手们归纳总结,看了觉得很有价值~,大家不妨参考下!  1. 打开新的窗口并传送参数:    传送参数: response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script

2006-12-08 08:42:00 459

原创 C# 继承的笔记

using System;class Car{    public  int Odometer = 0;    public virtual void MoveForward()    {        Console.WriteLine("Moving Forwards");        Odometer += 2;        Console.WriteLine("Odometer rea

2006-12-06 23:29:00 508

原创 StringBuilder AppendFormat 按照自己的方式格式化

using System;using System.Text;using System.Threading;public static class Program {   public static void Main() {      StringBuilder sb = new StringBuilder();      sb.AppendFormat(new BoldInt32s(),

2006-12-06 20:50:00 1473

原创 一个自定义登入的控件

// LoginUI.cs// Developing Microsoft ASP.NET Server Controls and Components// Copyright ?2002, Nikhil Kothari and Vandana Datye//using System;using System.ComponentModel;using System.Drawing;using S

2006-11-30 21:37:00 740

原创 一个简单的图表应用程序

public IEnumerable DataSource;public string  DataField;public string  BackColor = "White";public string  ForeColor = "Blue";protected override void OnDataBinding( EventArgs e ) {  IEnumerator objD

2006-11-17 16:40:00 481

原创 操作文件系统

。打开一个TXT文本的例子void Page_Load(Object sender , EventArgs e) {   StreamReader objStreamReader;   string  strInput;  if ( File.Exists( MapPath( "myFile.txt" ) ) )  {  objStreamReader = File.OpenTex

2006-11-14 22:38:00 336

原创 关于XMl Web 服务

创建简单的XML  服务Class="TemperatureService" Language="c#" %>using System;using System.Web.Services;public class TemperatureService : System.Web.Services.WebService{  [WebMethod()]  public double ToCe

2006-11-11 01:31:00 398

原创 一个注册和登入和Web.Config的例子

3个SQL语句 CREATE TABLE UserList(  u_id INT NOT NULL IDENTITY,  u_username VARCHAR( 100 ),  u_password VARCHAR( 100 )) //以上是创建一个表CREATE PROCEDURE DBRegister(  @username Varchar( 100 ),  @password V

2006-11-08 22:21:00 534

原创 用md5或则SHAI将密码加密后,并显示出来的例子

void Button_Click(Object sender , EventArgs e) { string  strHashValue;  strHashValue = FormsAuthentication.HashPasswordForStoringInConfigFile( txtPassword.Text, lstAlgorithm.SelectedItem.Text ); 

2006-11-08 10:16:00 617

原创 server = localhost; database = Northwind; integrated security=SSPI为什么连接不上数据库的原因

 如何使用C#连接到本地SQL Server 2005实例?连接字符串sqlConnectionString该怎样写。比如我本地的SQL Server 2005实例名称是SQLEXPRESS,要连接到Northwind数据库。 我用connectionString ="server = localhost; database = Northwind; integrated security=SSP

2006-11-02 14:24:00 1451

原创 Cookie .NET

 HttpCookie objCookie;    objCookie = new HttpCookie(txtCookieName.Text.ToString(), txtCookieValue.Text.ToString()); Response.Cookies.Add( objCookie ); 创建一个cookie值 在将 这个cookie加入到Response.Cookies的集合中

2006-11-01 10:41:00 403

转载 HTTP运行期与页面执行模型

HTTP运行期HTTP运行期处理客户端应用程序(例如Web浏览器)进入的一个Web请求,通过处理它的应用程序的适当组件路由请求,然后产生响应并发回提出请求的客户端应用程序。进入的HTTP Web请求最先由IIS Web服务器接收到,它在此请求基于ASP.NET已注册处理的扩展名传送到ASP.NET ISAPI上。HTTP运行期首先创建一个HttpContext对象的实例,它包含了当前正

2006-10-30 17:14:00 293

转载 HttpModule

HttpModule是如何工作的当一个HTTP请求到达HttpModule时,整个ASP.NET Framework系统还并没有对这个HTTP请求做任何处理,也就是说此时对于HTTP请求来讲,HttpModule是一个HTTP请求的“必经之路”,所以可以在这个HTTP请求传递到真正的请求处理中心(HttpHandler)之前附加一些需要的信息在这个HTTP请求信息之上,或者针对截获的这个HTT

2006-10-30 16:35:00 511

转载 HttpHandler

概述HttpHandler是一个HTTP请求的真正处理中心,也正是在这个HttpHandler容器中,ASP.NET Framework才真正地对客户端请求的服务器页面做出编译和执行,并将处理过后的信息附加在HTTP请求信息流中再次返回到HttpModule中。 IHttpHandler是什么IHttpHandler定义了如果要实现一个HTTP请求的处理所必需实现的一些系统约定。H

2006-10-30 16:33:00 395

转载 命令行csc编译及bin文件夹的问题

asp.net程序是经过编译执行的,这个大家都知道,尤其是使用Codebehind的时候,必须先把背后的.cs文件编译形成.dll文件,然后才可以执行。这个过程,如果你有vs.net,那很轻松就可以完成,但如果没有,那就得借助命令行了。仔细查一下.net framework sdk文档,可以找到关于这个话题的详细说明,好象没有必要专门贴一篇文章,但是今下午我在用的时候却发现了一个问题,文档中说“运

2006-10-30 14:51:00 572

原创 Web.Config的学习

         可以使所有的页面显示错误信息            配置运用到NoViewState目录  NoViewState子目录中的所有文件禁止视图状态                        因为web.config文件用allowOverride属性锁定设置,所以不能在application1,application1子目录中放一个修改标识设置的web.co

2006-10-27 08:49:00 754

原创 HttpApplication事件

  名称 说明 AcquireRequestState 当 ASP.NET 获取与当前请求关联的当前状态(如会话状态)时发生。

2006-10-26 12:30:00 410

原创 理解Context和使用Global.asax文件

在ASP.NET页面中,Page对象都是默认对象。 在许多情况下,如果调用方法或泽访问属性时没有指定对象,就是隐含地调用或访问了Page对象的方法或属性。Global.asax文件并不以Page对象作为默认对象,所以调用MapPath方法时必须写Context.MapPath,如果在Global.asa调用方法或泽访问属性的时候没有作用,可以试试在前面加上Context.

2006-10-26 12:17:00 418

原创 SQL 全文检索应用

CONTAINS 语法我们通常在 WHERE 子句中使用 CONTAINS ,就象这样:SELECT * FROM table_name WHERE CONTAINS(fullText_column,search contents)。我们通过例子来学习,假设有表 students,其中的 address 是全文本检索的列。1. 查询住址在北京的学生SELECT student_id,stude

2006-10-24 11:36:00 3107 2

原创 DataView.Find 和 DataView.Sort的关系

DataSet dstAuthors;SqlConnection conPubs;SqlDataAdapter dadAuthors;DataView dvwAuthors;Object[] arrValues = new Object[2]; // Grab Authors TabledstAuthors = new DataSet();conPubs = new SqlConnection

2006-10-20 10:26:00 2360

原创 AllowSorting 排序

DataView dvwProducts;void Page_Load(Object sender , EventArgs e) { SqlConnection conNorthwind; SqlDataAdapter dadProducts; DataSet dstProducts; // Create Products DataSet dstProducts = new DataS

2006-10-20 10:19:00 484

原创 UniqueConstraint 对列的限制,列中的值必须是唯一性的

void Page_Load(Object sender , EventArgs e) { DataSet dstProducts; SqlConnection conNorthwind; SqlDataAdapter dadProducts;    // Grab Products Table dstProducts = new DataSet();    conNorthwind = ne

2006-10-19 12:35:00 465

原创 理解DataSet

连接数据库有两种类如果你只需要获取一些数据库记录并且将其快速地显示在网页上,那么应该使用Command和DataReader类。另一方面,如果你需要操作断开连接的内存数据库记录,就需要使用DataSet.DataReader每次只表示一个数据记录。必须调用Read()方法从底层数据库表中获取每个新记录,装载进内存。每次调用Read()方法时,原来获取的记录会丢失,因此DataReader不

2006-10-18 22:59:00 431

原创 DataGrid 两种分页格式

PagerStyle-Mode="NumericPages" void Page_Load(Object sender, EventArgs e){  if (! IsPostBack ) {  BindDataGrid(); }}void BindDataGrid() { SqlConnection conPubs; SqlDataAdapter dadTitles; DataSet

2006-10-18 08:16:00 306

原创 System.Drawing.Color.LightGreen

void Page_Load(Object sender , EventArgs e) { if (! IsPostBack ) {  SqlConnection conPubs;  SqlCommand cmdSelect;        conPubs = new SqlConnection("server=IPROMISE;database=pubs;uid=sa;password=

2006-10-17 17:21:00 334

转载 第一次使用SQL Server 2005的SSIS(Integration Services)

升级到SQL Server 2005,一直没找到原来的DTS,原来现在是Integration Services 替代了原来的DTS,呵呵,当时不知道这是什麽东西,没有安装,现在补装上;今天做了个最简单的DTS数据库的复制工作1.打开Visual Studio 2005,或者从开始菜单Microsoft SQL Server 2005中打开SQL Server Business Intellige

2006-10-13 23:48:00 760

原创 .NET DropDownList数据绑定

void Page_Load(Object sender , EventArgs e) { SqlConnection conPubs;    SqlCommand mycmdSelect;    conPubs = new SqlConnection("server=IPROMISE//SQLEXPRESS;database=Show5new;uid=sa;password=;");  

2006-10-12 21:25:00 803

原创 控件绑定顺序

int intNextNum;void Page_Load(Object sender , EventArgs e) { lblMessage1.DataBind();     1 lblMessage2.DataBind();     2 DataBind();}string  GetNext() { intNextNum += 1; return intNextNum.ToStri

2006-10-12 20:09:00 344

原创 .NET 用函数给控件赋值

void Page_Load(Object sender , EventArgs e){  lblMessage.DataBind();}string  GetTime() { return DateTime.Now.ToString( "T" );}SimpleBind.aspx  ID="lblMessage"  Text=  Runat="Server" />

2006-10-12 19:17:00 367

原创 连接SQL数据库的2种方法 .NET

第一种 SqlCommand     void Page_Load()  {    string strConnection = "server=IPROMISE//SQLEXPRESS;database=Show5new;uid=sa;password=;";    data_src.Text = strConnection;;    SqlConnection objConnectio

2006-10-11 00:17:00 424

原创 用户控件和CodeBehind

用户控件SimpleUserControl.ascx                 Hello, Im a user control, SimpleUserControl.aspxSimple User control Example                                    and Im text in an ASPX page.   

2006-10-09 22:17:00 409

原创 如何动态的加载用户自定义控件

void Page_Load(Object sender , EventArgs e) {  string  strFeatured;  Random  RanNum = new Random();  Control ctlControl;  strFeatured = "FeaturedProduct" + RanNum.Next( 1, 3 ) + ".ascx";  ctlContr

2006-10-06 20:38:00 566

XML使用指南- 对于初学者非常有用

XML使用指南- 对于初学者非常有用-讲的是XML方面的基础

2009-01-08

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除