程式設計中我們時常需要檢測使用者輸入是否正確,特別是姓名,地址等等是不是輸入的漢字。那麼,如何判斷一個字元是不是漢字呢?其實在asp中至少有兩種方式 一、直接將某字元用asc轉為ascii碼,如果是英文,他應該是0-127的範圍,而漢字則是一個比較大的數字,所以可以使用以下代碼來判斷: if abs(asc(whichchar))>127 then response.write whichchar & &quo
如果有人告訴你學習 ASP 不需要任何編程知識,那麼他錯了;如果我告訴你學習 ASP 必須掌握一門程式設計語言,那麼我錯了。ASP 動態伺服器頁面環境的特點就在於它是通過一種或幾種指令碼語言而寫成的,指令碼語言可以看作是程式設計語言的簡化版,它易於學習和掌握,這給廣大動態網站的設計者們提供了相當大的便利。可以這麼說 : 指令碼語言運用的得當與否直接關係到 ASP 應用程式的優與劣。繼上一篇我們學習了指令碼語
ASP錯誤總結 -------------------------------------------------------------------------------- Microsoft VBscript語法錯誤(0x800A03E9)-->記憶體不足 Microsoft VBscript語法錯誤(0x800A03EA)-->語法錯誤 Microsoft VBscript語法錯誤(0x800A03EB)-->缺少 '
同一空間多綁一個網域名稱複製代碼 代碼如下:<% CheckDomain Sub CheckDomain() dim sDomain sDomain = Request.ServerVariables("HTTP_HOST") If Instr(sDomain,"a.xxx.com")>0 then Response.Redirect "a/" End Sub %>
JavaScript is loosely typed. Database files are not. If you put text into a Boolean database column or a Boolean value into a date/time column, then you will get an error. For the most part this is not a problem, except for date/time. It does not
The Connection Execute(): If you want to retrieve data from a database then you have no choice but to use a Recordset. However, for the purposes of adding, updating, and deleting data you don't necessarily have to have a Recordset. It's up to you.
Recordset is another created/instanciated Object. It is a collection of data taken from a database. Recordset has 26 properties, 25 methods, 11 events, and two (2) collections. The vast majority of Recordset is beyond the scope of this web site.
While this section is devoted to ASP database utilization, it very important to remember that this web site is not intended to be a thorough ASP resource. Remember, the focus of this site is strictly limited to how to use JavaScript as your primary
The ASPError Object has zero (0) Methods, nine (9) Properties, zero (0) Events, and zero (0) Collections. AspCodeAspDescriptionCategoryColumnDescriptionFileLineNumberSourceThe way you access the ASPError Properties is with a Server Method. Yeah, I
Server Side Includes: Experienced JavaScript programmers know that code reuse is good. Experienced JavaScript programmers also know that JavaScript functions are data types. So, we should be able to store a JavaScript function inside a Session
Overview: The Session Object is how you track a single user across many pages. It has four (4) properties, two (2) collections, one (1) method, and two (2) events. Get Started: In this series of examples we will create a password system. We will use
Overview: The Application Object represents a collection of ASP pages. The Application object has zero (0) properties, two (2) collections, two (2) methods, and two (2) events. Get Started: Below are a couple scripts for lesson11.
Global.asa: First of all, what is a global.asa? It's an optional script file that holds certain "global" information that you can access through the entire ASP appliciation. The global.asa is a plain text file saved with the .asa extension. You
Response Cookies in General: We'll start with the Response Cookies collection. I don't think it could be any easier. You simply put the name of the cookie in the argument. The corresponding value is a string. The only time it gets complicated is
Below is a table of Response Properties along with examples and explanations. Response PropertiesBufferResponse.Buffer = trueAllows for the buffering of outputCacheControlResponse.CacheControl="Public" Sets Cache to "Public" or