在asp.net中動態載入控制項比較簡單,這裡我講得是對使用者控制項的載入,比較典型的就是被載入的使用者控制項裡麵包含回傳事件,在回傳回來的時候需要保持新的資料。 先來構建分頁使用者控制項,由於前面幾篇文章都在講這些東西,所以就直接拿過來改了改,分頁代碼可以查看上面的文章1,文章2,下面是使用者控制項的一部分代碼。public class PagingControl : System.Web.UI.UserControl{ private int pageCount;
前台頁面<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="Blog_calendar.WebForm1" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ><HTML> <HEAD>
<% Dim mode mode=request.form("text4")if mode=1 thenname=request.form("text1")age=request.form("text2")addr=request.form("text3")if not isnumeric(age) then response.write "age must be number!<a href=javascript:history.go(-1)>try again</a&
[Exception] – Could not load file or assembly App_Web_*** ASP.NET While loading an asp.net web page, it encounters the following error. Could not load file or assembly 'App_Web_33cq6epw, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one
<%'功能:返回 Boolean 值指明運算式的值是否為字母。'來源:http://jorkin.reallydo.com/article.asp?id=525Private Function IsAlpha(byVal sString) Dim regExp, oMatch, i, sStr For i = 1 To Len( sString ) sStr = Mid(sString, i, 1) Set regExp = New RegExp
<%'功能:擷取檔案資料流'來源:http://jorkin.reallydo.com/article.asp?id=523Function LoadFromFile(sFileName, sCharSet) On Error Resume Next Dim oStream Set oStream = Server.CreateObject("ADODB.Stream") oStream.Type = 2 oStream.Mode =
<%'功能:將字串中每個單詞的首字母都變為大寫'來源:http://jorkin.reallydo.com/article.asp?id=481Private Function PCase(byVal sString) Dim Tmp, Word, Tmp1, Tmp2, firstCt, a, sSentence, c, i If IsNull(sString) Then PCase = Null Exit Function Else