Time of Update: 2017-01-13
建立access資料庫教程db1.mdb,在其中建立資料表user,欄位分別為:u_uid(自動),u_user(使用者名稱:文本型),u_pass(密碼:文本型) 四、建立接收register.asp中發送過來的表單資料,並插入到資料表user中的註冊成功顯示頁面:<% '字串串連資料庫的方法 set conn=server.createobject("adodb.connection") conn.open "driver=driver do
Time of Update: 2017-01-13
舉例: 如:在欄位名處輸入:username,password,email,telphone注意:不同的欄位名用英文逗號隔開,且不支援星號表名處輸入要查詢的表名:如:table1產生後的代碼是:username = request("username")password = request("password")email = request("email")telphone = request("telphone"
Time of Update: 2017-01-13
id = saferequest("id")sql="delete from table1 where whereid>"&id&""rs.open sql,conn,1,3response.write "<script>alert('刪除成功');location.href='del.asp';</script>"set rs=nothingset
Time of Update: 2017-01-13
sub efolder(foldername) dim fsoset fso=server.createobject("scripting.filesystemobject")if fso.folderexists(server.mappath(foldername)) thenset fso=nothing exit subelsefso.createfolder(server.mappath(foldername)) end if set fso=nothingend
Time of Update: 2017-01-13
on error goto z'dim url,key,wwwname url=request.servervariables("server_name") if instr(url,".")>0 then key=split(url,".") wwwname=key(0) wwwname=replace(wwwname,"http://","")end if response.write(
Time of Update: 2017-01-13
<script language="網頁特效" type="text/javascript">var str;str="10 3333 abc123";var rg;rg=/[0-9]{1,}|s/ig;var newstr=str.replace(rg, "");document.write(newstr);</script&
Time of Update: 2017-01-13
代碼如下 複製代碼 function htmlencode(text) { return text.replace(/&/g, '&').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>')
Time of Update: 2017-01-13
癥狀上傳檔案到 windows server + iis 6.0或者iis7.0 伺服器的時候遇到下列錯誤:請求對象錯誤 'asp 0104 : 80004005′操作被禁止原因iis6.0 和iis7禁止上傳超過 200kb 的檔案. 因此你需要修改 iis 的預設設定。當然此200k限制僅限無組件上傳,如果使用aspupload等上傳時不會有此限制。解決方案iis6首先停止 iis 服務,之後開啟 c:windowssystem32inetsrv 中的
Time of Update: 2017-01-13
php調用fckeditor編輯方法<?include("../editor/fckeditor.php");$ofckeditor = new fckeditor('fckeditor1') ; $ofckeditor->basepath = '../editor/'; $ofckeditor->value = ''; $ofckeditor->width = '100%' ; $ofckeditor->height = '360' ;
Time of Update: 2017-01-13
接上一節,我們這一節主要計論如何使用DataSet,在資料庫中增加、修改、刪除一個數據。首先我們需要開啟一個連接,我們的資料庫還是用上一節的吧:)string MyConnString = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=c:/test/test.mdb;";string strComm = "select * from UserList";ADOConnection MyConnection = new ADOConnection(
Time of Update: 2017-01-13
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 
Time of Update: 2017-01-13
C# 版本UpLoad.aspx<%@ Page language="c#" Codebehind="UpLoad.aspx.cs" AutoEventWireup="false" Inherits="WebPortal.Upload" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ><
Time of Update: 2017-01-13
在以前的Web應用中,上傳檔案是個很麻煩的事,現在有了.NET,檔案上傳變得輕而易舉。下面的這個例子實現了多檔案上傳功能。可以動態添加輸入表單,上傳的檔案數量沒有限制。代碼如下:MultiUpload.aspx<%@ Page Language="vb" AutoEventWireup="false"
Time of Update: 2017-01-13
<%@ Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server">protected void
Time of Update: 2017-01-13
<%@ Page Language="C#" %><%@ Import Namespace="System.Data.OleDb" %><%@ Import Namespace="System.Data.SqlClient" %><script runat="server">protected void Page_Load( object sender,
Time of Update: 2017-01-13
Asp.Net中的HttpHandler很多時候,我們建立一個xxx.aspx頁和xxx.aspx.cs檔案,不過是為了實現一個很簡單的功能,如:輸出xmlDom,登出並跳轉,並沒有什麼html的輸出,很是麻煩,需要建立一個頁,刪除多餘的html,並在page_load裡面寫處理代碼。而使用HttpHandler就不需要這麼麻煩了。可以用任何符合Common Language Specification (CLS) 的語言編寫自訂 HTTP 處理常式來處理特定的、預定義類型的 HTTP
Time of Update: 2017-01-13
private void Page_Load(object sender, System.EventArgs e) { // 在此處放置使用者代碼以初始化頁面
Time of Update: 2017-01-13
第一,在ResumeController中添加兩個Action,如下面的代碼: 代碼如下複製代碼 //// GET: /Resume/Edit/5public ActionResult Edit(int id){ Resume.Models.Resume resume = context.Resumes.Find(id); ViewBag.NationId = new SelectList(context.Nations, "NationId"
Time of Update: 2017-01-13
最近在ASP.NET中做了一個AJAX調用 : Client端先從ASP.NET Server後台取到一個頁面模板,然後在頁面初始化時再從Server中取一些相關資料以實現頁面模板的動態顯示。具體實現為:1) Client向 ASP.NET後台發送HTTP GET 請示2) 後台給Client發送一個HTML模板,同時在記憶體中儲存一個XML
Time of Update: 2017-01-13
Hi 各位同學們,首先小拍預祝同學們國慶愉快!今天的第一課主要講《Windows XP如何安裝IIS》,滿足初級的童鞋們要求。 好,首先我先介紹下示範的電腦的資訊:作業系統:Microsoft Windows Xp Professional 2002 Service Pack3 (簡稱XP SP3