· 在ASP.net中我们通过添加组件类来实现代码重用
在ASP.net项目文件中添加组件类假如为conn.vb
打开这个文件,这个文件是
public class conn
end class
这样我们有两种方式来进行代码重用
一种方式为直接在class中写代码,一种为在外面定义一个namespaces
如下(1)
Public Class conn
Inher...
· ABSTRACT
Administering applications and servers when not connected to the network can be a nightmare, especially when only a few people manage the application. Just imagine going out for an evening on the town and then you’re paged at one o’clock in the morning with an alar...
· WROXControlLib
Step one is to set up a Web Control Library. Open Visual Studio .NET and choose a Web Control Library project. Add three new Custom Web Controls to the project named evenlog.cs, process.cs, and services.cs. Add System.ServiceProcess as a reference to the projec...
· Call the event viewer control by the tag prefix colon and the class name of eventlog.cs. Note that we set a property from the query string in the code behind file.
Display vw_EventLog.ASPx file
< !-- Register the WROXControlLib Assembly -- >
<%@ Register TagPrefix=...
· ASP.net 提供了三种存放 session的方式。
1 InProc
2 State Server
3 SQL Server
第一种是我们经常用的,第2中就是使用一个名为 state server 的机器用它的内存来存放其他机器的session 状态,其实,我们还可以在 sql server 里面来存放和取得 session。是不是第一次听说。
下面讲述实现过程。 ...
· Creating HttpHandlers and HttpModules
Introduction
ASP.NET allows you to extend its functionality in two main ways :
HttpHandlers
HttpModules
Http handlers are special applications that typically handle files with certain extension. For example when you request a file with...
· Figure 3 CachingThe amount of data you can reach at any level is different, but the right doses are determined on a per-application basis.
Also different from layer to layer is the time needed to retrieve data. Session, in most cases, is an in-process and in-memory object. No...
· Web.Config Written on: Nov, 16th 2001.
Application("DSN") = "Server=moon; Driver=Sql Server; Database=Store; UID=user; PWD=bingo;"
Above declaration in the global.asa file might be familiar to almost all ASP programmers. While going through the MSDN, I ...
· Creating DataGrid Templated Columns Dynamically - Part IIntroductionFew months back I wrote article on how to create DataGrid programatically. The article explained how to created a DataGrid with bound columns on the fly. Many readers asked whether we can do similar thing wit...
· dim email
dim status
dim emaildata
dim LicenseKeylicensekey = 0
if Request.Form.Count > 0 then
email = Request.Form("email")
Dim oXMLHTTP
Set oXMLHTTP = server.CreateObject("MsXML2.ServerXMLHTTP") oXMLHTTP...
· namespace POP3Client
{
using System.IO ;
using System.Net;
using System.Net.Sockets ;
//Please note that all code is copyright 2002 by William J Dean
public class POP3client
{
public enum connect_state {disc,AUTHORIZATION,TRANSACTION,UPDATE}; ...