<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 20  文章 - 7  trackbacks - 0
    <2025年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    常用鏈接

    留言簿(1)

    隨筆檔案

    文章分類

    文章檔案

    積分與排名

    • 積分 - 20288
    • 排名 - 1715

    最新評論

    一種我未用過的方法,但現(xiàn)在覺得很爽

     1<%@language=vbscript codepage=936 %>
     2<%
     3option explicit
     4response.buffer=true    
     5dim conn
     6dim connstr
     7dim db
     8db="yipinjia.asp"
     9Set conn = Server.CreateObject("ADODB.Connection")
    10connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
    11conn.Open connstr
    12
    13%>
    14
    15<%
    16Rem 判斷發(fā)言是否來自外部
    17function ChkPost()
    18    dim server_v1,server_v2
    19    chkpost=false
    20    server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
    21    server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
    22    if mid(server_v1,8,len(server_v2))<>server_v2 then
    23        chkpost=false
    24    else
    25        chkpost=true
    26    end if
    27end function

    28%>
    posted @ 2006-03-16 00:34 The Game, tomtom 閱讀(221) | 評論 (0)編輯 收藏

       在實現(xiàn)頁面跳轉(zhuǎn)的時候,有些人喜歡用Response.Redirect,而有些人則喜歡用Server.Transfer。大部分時間似乎這兩種方法都可以實現(xiàn)相同的功能,那究竟有區(qū)別嗎?

            查了些文檔,發(fā)現(xiàn)兩者區(qū)別還是很明顯的。根本上,Response是叫瀏覽器去重新轉(zhuǎn)向到指定的網(wǎng)頁,而Server自然是發(fā)生在服務(wù)器端為主了,因此會有以下區(qū)別:
    1. Server.Transfer只能夠轉(zhuǎn)跳到本地虛擬目錄指定的頁面,而Response.Redirect則十分靈活;
    2. Server.Transfer可以將頁面參數(shù)方便傳遞到指定頁面;
    3. 使用時,Server.Transfer跳到別的頁面后,瀏覽器顯示的地址不會改變,有時反而會造成誤會,當(dāng)然也有些場合需要這樣的效果;
    4. Server.Transfer可以減少客戶端對服務(wù)器的請求;

    posted @ 2006-03-11 12:12 The Game, tomtom 閱讀(194) | 評論 (0)編輯 收藏
    安裝asp.net環(huán)境,首先先安裝IIS.

      一 IIS安裝方法:
      1.選擇"控制面板".

      2.點(diǎn)"添加刪除軟件".

      3.選擇"添加組件",把系統(tǒng)盤放的光驅(qū)中.

      4.選中IIS點(diǎn)下一步就可以了.

      5.在瀏覽器中輸入" http://localhost "測試IIS是否安裝成功.

      到這步你可以把你的asp網(wǎng)頁放到系統(tǒng)盤(一般是C盤,我的是F盤)的C:\Inetpub\wwwroot的文件夾中了。

      比如你你C:\Inetpub\wwwroot中建了一個ip363,在瀏覽器中輸入 http://localhost/ip363 就可以了.

      二 配置asp.net環(huán)境:

      下載mdac安裝:

      直接下載2.8中文版:
      http://download.microsoft.com/download/8/b/6/8b6198c0-fe96-4811-9d81-d5c76dd5fea8/MDAC_TYP.EXE

      然后下載.NET Framework 1.1版可再發(fā)行組件包
      http://download.microsoft.com/download/7/b/9/7b90644d-1af0-42b9-b76d-a2770319a568/dotnetfx.exe

      然后下載.NET Framework SDK1.1安裝
      下載1.1簡體中文版:
      http://download.microsoft.com/download/0/f/e/0fecf85c-fb50-4ca9-adf2-c4be7ec9b454/setup.exe

      最后安裝簡體中文語言包
      http://download.microsoft.com/download/4/b/c/4bce2f4b-548e-4e36-a3f7-46d79a6abd39/langpack.exe

      如果你沒法運(yùn)行msi文件,請安裝以下軟件
      http://www.microsoft.com/downloads/details.aspx?displaylang=en&;FamilyID=4B6140F9-2D36-4977-8FA1-6F8A0F5DCA8F
     
      最后如果在程序那里看到 Microsoft .NET Framework SDK 就安裝完成了.

      也可以安裝Microsoft VS.NET 這樣寫asp.net代碼就簡單方便了

    posted @ 2006-02-14 16:40 The Game, tomtom 閱讀(246) | 評論 (0)編輯 收藏
    1<%@ page language="vb" %>
    2<h1>使用Choose函數(shù)簡化SelectCase語句</h1>
    3<%
    4Dim intA as integer=2, strTemps as string
    5strTemps=Choose(intA,"","","","","")
    6response.write("intA的值是" & intA & "時,結(jié)果為"&strTemps)
    7%>




    Choose函數(shù)語法:  Choose(數(shù)值變量,返回值1,返回值2,返回值3,......)      注意intA一定要是數(shù)值變量!


    response.write()里面如果是字符串或html語句,要加上"",是變量則加上&,  句中strTemps在右側(cè)則只需加一個&
    posted @ 2006-02-08 16:20 The Game, tomtom 閱讀(819) | 評論 (0)編輯 收藏
    1<%@ page language="vb" %>
    2<h1>使用Iif()函數(shù)簡化IfThen語句</h1>
    3<%
    4Dim intA As integer=11, strTemps As String
    5strTemps=Iif(intA>10,"intA變量的值大于10","變量的值小于10")
    6response.write(strTemps)
    7%>




    Iif函數(shù)語法: Iif(條件式,語句1,語句2)
         語句1:當(dāng)條件式運(yùn)算結(jié)果為True值的表達(dá)式或變量內(nèi)容
         語句2:當(dāng)條件式運(yùn)算結(jié)果為False值的表達(dá)式或變量內(nèi)容


    respose.write()里面可以直接寫變量的名
    posted @ 2006-02-08 15:55 The Game, tomtom 閱讀(439) | 評論 (0)編輯 收藏

     

     1<body>
     2<h1>獲得數(shù)組維數(shù)的最大索引值</h1>
     3<%
     4dim arrayA(10as integer
     5response.write("獲取一維數(shù)組的最大索引值,結(jié)果為" & ubound(arrayA) & "<br>")
     6dim arrayB(15,20as integer
     7response.write("獲取二維數(shù)組第一維度的最大索引值,結(jié)果為"& ubound(arrayB,1&"<br>")
     8response.write("獲取二維數(shù)組第二維度的最大索引值,結(jié)果為"& ubound(arrayB,2)&"<br>")
     9%>
    10</body>








    Dim ArrayA as integer() = (1,2,3,4,5)
    相當(dāng)于聲明一個ArrayA(4)的一維數(shù)組

    posted @ 2006-02-06 20:44 The Game, tomtom 閱讀(653) | 評論 (0)編輯 收藏
    本人在 http://www.goofar.com 注冊了一個免費(fèi)asp.net空間,10M的,還算不錯.
    只是每天只允許200個用戶注冊,大家耐心點(diǎn)試咯.
    posted @ 2006-02-05 22:01 The Game, tomtom 閱讀(552) | 評論 (2)編輯 收藏

    <%@ page language="vb" %>
    <html>
    <head>
    <title>
    vb.net操作符號綜合范例
    </title>
    </head>
    <body>
    <%
    dim intA as integer = 10, intB as integer = 5, intC as integer = 3
    dim strA as string = "ASP.NET", strB as string = "VB.NET"
    dim blnA as boolean = true, blnB as boolean = false
    response.write(
    "條件設(shè)置:<br>")
    response.write(
    "整數(shù)條件: intA=" & intA & ",intB=" & intB & ",intC=" & intC & """<br>")
    response.write(
    "字符串條件: strA=""" & strA & """,strB=""" & strB & """<br>")
    response.write(
    "布爾代數(shù):blnA=" & blnA & "blnB=" & blnB & "<br><b>")
    response.write(
    "括號優(yōu)先級:")
    response.write(
    "(intA - intB)*intC結(jié)果為:"&((intA-intB)*intC)&"<br>")
    response.write(
    "算數(shù)操作符:")
    response.write(
    "intA-intB*intC結(jié)果為:"&(intA-intB*intC)&",<br>")
    response.write(
    "比較操作符:")
    response.write(
    "intA>intB的結(jié)果為:" &(intA>intB)& ",")
    response.write(
    "strA<>strB的結(jié)果為 " & (strA<>strB)& "<br>")
    response.write(
    "邏輯操作符:")
    response.write(
    "blnA and blnB的結(jié)果為" & (blnA and blnB) & ",")
    response.write(
    "blnA or blnB的結(jié)果為" & (blnA or blnB) & "<br>")

    %
    >
    </body>
    </html>
    posted @ 2006-02-05 21:36 The Game, tomtom 閱讀(684) | 評論 (1)編輯 收藏
     1<% @page language="vb" %>
     2<html>
     3<head>
     4<title>
     5編寫一個asp.net程序代碼
     6</title>
     7</head>
     8<body>
     9<%
    10dim strAuthorName
    11dim intDefaultSize as integer
    12dim strFontName as string="隸書"
    13const strTitle as string="編寫""一個""asp.net程序"
    14const strFontColor as string="purple"
    15strAuthorName=10
    16strAuthorName="tomtom"
    17intDefaultSize= 5
    18response.write("<font face=" & strFontName & " size=" & intDefaultSize & " color=" & strFontColor & ">")'這里的"和&之間一定要有一個空格!!!我不加空格的話就調(diào)試不到,不知道為什么,有沒有高手可以告訴我?
    19response.write("標(biāo)題文字:" & strTitle & "<br>")
    20response.write("作者:" & strAuthorName & "<br>")
    21response.write("默認(rèn)中文字體:" & strFontName & "<br>")
    22response.write("默認(rèn)字號:" & intDefaultSize & "<br>")
    23response.write("</font>")
    24%>
    25</body>
    26</html>






    posted @ 2006-02-05 21:36 The Game, tomtom 閱讀(242) | 評論 (1)編輯 收藏

     

    <% @ page language="VB" %>
    <html>
    <head>
    <title>
    我的第一個asp.net程序代碼
    </title>
    </head>
    <body>
    <%
    Dim i as integer
    For i = 1 to 5 %>
    <font size= <=i %>>我的第一個asp.net程序代碼<br></font>
    <%
    Next
    Response.write(
    "編寫第一個asp.net程序!")
    %
    >

    </body>
    </html>
    <font size=<%=i%>>我的第一個asp程序</br></font>

    posted @ 2006-02-05 21:35 The Game, tomtom 閱讀(173) | 評論 (0)編輯 收藏
    僅列出標(biāo)題
    共2頁: 上一頁 1 2 
    主站蜘蛛池模板: 免费永久看黄在线观看app| 亚洲AV永久无码精品水牛影视| 一级做a爰片性色毛片免费网站| 国产av无码专区亚洲av果冻传媒| 91精品国产免费| 色九月亚洲综合网| 亚洲国产成人久久精品动漫| 女人毛片a级大学毛片免费| 亚洲一区二区三区免费| 亚洲国产精品久久网午夜 | 亚洲国产精品尤物YW在线观看| a毛片全部播放免费视频完整18| 亚洲中文无码线在线观看| 国产精品亚洲专区无码牛牛 | 亚洲AV无码久久精品蜜桃| 免费福利在线播放| 亚洲国产免费综合| 亚洲制服丝袜精品久久| 久久久久亚洲AV成人片| 亚洲AV无码成人精品区在线观看| 国产亚洲av片在线观看18女人| 哒哒哒免费视频观看在线www| 免费看美女被靠到爽的视频| 9久9久女女免费精品视频在线观看 | 99re6在线视频精品免费下载 | 国产亚洲福利精品一区| 亚洲精品99久久久久中文字幕| 午夜国产大片免费观看| 免费看国产一级特黄aa大片| 在线观看免费亚洲| 国产老女人精品免费视频| 女人18一级毛片免费观看| 成人免费在线视频| 日本不卡高清中文字幕免费| 免费无码一区二区三区蜜桃大 | 亚洲精品无码少妇30P| 亚洲午夜精品一区二区麻豆| 亚洲看片无码在线视频 | 日韩精品视频免费网址| 国产精品久免费的黄网站| 波多野结衣中文一区二区免费|