Time of Update: 2018-12-08
複製代碼 代碼如下:class Program { static void Main(string[] args) { TestClass objA = new TestClass(); objA.Name = "I am ObjA"; Console.WriteLine(String.Format("In Main:{0}", objA.Name)); TestFun(objA); Console.WriteLine(String.Format("In Main:{0}",
Time of Update: 2018-12-08
一般的單項資料選擇可以使用DropdownList控制項來實現,但對於有多個選擇性輸入,而且輸入有層次關係的內容,最好選擇TreeView控制項來實現。本文介紹如何使用使用TreeView控制項來有效擷取使用者的輸入,其中涉及到TreeView控制項的級聯選擇、去掉節點HTML連結變為展開目錄、擷取選擇內容、如何構造資料庫的資訊變為樹形內容以及快顯視窗使用等知識點,本文輸入應用層級的例子,希望能做個記號,對己對人,皆為利好!^_^本文的經營範圍是一個可以輸入分類及詳細子內容的,由於內容繁多,而且
Time of Update: 2018-12-08
需要提交兩次才能通過。解決的辦法是禁用RequiredFieldValidator控制項的用戶端指令碼驗證功能。只在伺服器端驗證。複製代碼 代碼如下:<asp:RequiredFieldValidator ID="RequiredFieldValidator16" runat="server" ControlToValidate="fck" Display="Dynamic" EnableClientScript="False" ErrorMessage="還沒有填寫內容"><
Time of Update: 2018-12-08
對於GridView匯出的內容的代碼大致如下: Response.Clear(); Response.Buffer = true; Response.Charset = "GB2312"; Response.AppendHeader("Content-Disposition", "attachment;filename=" + fileName + ".xls"); Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB23
Time of Update: 2018-12-08
1.安裝.netframework(具體版本可以自己選,建議裝netframework3.5sp1) 2.安裝mod_aspdotnet.so,這個支援apache2.2的不好找,附上http://xiazai.jb51.net/200912/tools/mod_aspdotnet-2.2.0.2006-setup-r2.rarapache2.0的,可以到網上找,很多。 3.修改配置 開啟httpd.conf 在最後添加 複製代碼 代碼如下:LoadModule
Time of Update: 2018-12-08
1、建立一個類,實現IHttpModule介面 代碼 複製代碼 代碼如下:public class SqlHttpModule : IHttpModule { public void Dispose() { } public void Init(HttpApplication context) { context.AcquireRequestState += new EventHandler(context_AcquireRequestState); } }
Time of Update: 2018-12-08
一個網站程式,在添加新聞時出現錯誤 以下是錯誤提示: Microsoft OLE DB Provider for ODBC Drivers 錯誤 '80040e21' 多步 OLE DB 操作產生錯誤。如果可能,請檢查每個 OLE DB 狀態值。沒有工作被完成。 出現這種錯誤的原因是因為我把access連接字串修改為"Driver={Micorsoft Access Driver ()};dbq=" &
Time of Update: 2018-12-08
以前也學過一些這方面的知識,好久都沒怎麼用了,忘得也差不多,正好現在可以重新鞏固一遍,熟悉一下對XML檔案的操作。 XML(Extensible Markup Language)即可延伸標記語言 (XML),它與HTML一樣,都是SGML(Standard Generalized Markup Language,標準通用標記語言 (SGML))。Xml是Internet環境中跨平台的,依賴於內容的技術,是當前處理結構化文檔資訊的有力工具。
Time of Update: 2018-12-08
複製代碼 代碼如下:<% Response.Buffer = True '一般情況下,當使用者請求WEB伺服器時,伺服器把請求回複給用戶端。在用戶端,瀏覽器把緩衝作為一種加快速度的策略,就是當請求時先檢查緩衝的情況,如果有就直接調緩衝了,而不請求伺服器了。
Time of Update: 2018-12-08
1,把代碼放在sqlhelper中。 複製代碼 代碼如下:#region 截取字串 /// <summary> /// 截取字串 /// </summary> /// <param name="str_value"></param> /// <param name="str_len"></param> /// <returns></returns> public static string
Time of Update: 2018-12-08
本次工作內容是要將以下資料解析成.Net可以使用的資料,返回的資料除了header,其他的都是可變的,也就是說結構不是固定的。完全由使用者選擇,所以選擇了產生DataTable。 Json資料格式如下: 複製代碼 代碼如下:{"dataSet":{ "header":{ "returnCode":"0", "errorInfo":"HTTP請求錯誤", "version":"V1.0R010", "totalRows":"2000", "returnRows":"20" },
Time of Update: 2018-12-08
複製代碼 代碼如下:using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls;
Time of Update: 2018-12-08
複製代碼 代碼如下:using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using
Time of Update: 2018-12-08
一.準備必要的檔案1. SQL指令檔,產生以後安裝過程中需要的表和預存程序等等;產生之後,就暫時把它命名為db.sql(注意大小寫)2.LisenceFile.rtf的安裝檔案,因為我的系統是個人的,而且free的,所以就沒有做。這個以後也是要用到的。二.在自己現有的項目裡面建立部署項目:1. 在[檔案] 功能表上指向“添加項目”,然後選擇“建立項目”。(圖1-2)2. 在“添加新項目”對話方塊中,選擇“項目類型”窗格中的“安裝和部署項目”,然後選擇“模板”窗格中的“Web
Time of Update: 2018-12-08
複製代碼 代碼如下://JS代碼 function checkname() { var Msg = document.getElementById("d_username"); var chk = CheckN(); if (chk) { $.ajax({ url: 'registerOK.aspx', type: 'POST', data: { lb: "checkname", username: $("#username").val() }, dataType: 'html',
Time of Update: 2018-12-08
複製代碼 代碼如下:////別人寫的ubb代碼 using System; using System.Text; using System.Text.RegularExpressions; namespace Test.Com { /// <summary> /// 功能:UBB代碼 /// 作者:Rexsp /// 日期:2004-4-6 /// </summary> public class UBB { #region 建構函式 public UBB() { // /
Time of Update: 2018-12-08
函數getcache,會自動建立需要的緩衝。 複製代碼 代碼如下:Function getcache(funsname,isreset,isarr,timeinfo) ‘funsname — 需要緩衝的內容,這裡要輸入一個function名 ‘isreset –是否更新[值:0(根據時間或判斷緩衝為空白時自動更新)、1(主動更新)] ‘ isarr —- 所緩衝的內容是否為一個資料[0為字串,1為數組] ‘ timeinfo —- 緩衝更新時間,單位為秒,當值為0時,則只在緩衝為空白時,才更新
Time of Update: 2018-12-08
所以最好在資料訪層分頁,如果這樣就要使用預存程序來分頁.以下是以pubs 資料庫中的employee表為例來進行資料分頁的預存程序,你可以參考它根據實際情況來建立自己的預存程序. 注:@pageindex 資料頁的索引,@dataperpage 每頁的記錄數目,@howmanyrecords 用來擷取總的記錄數. 複製代碼 代碼如下:create proc getdata @pageindex int,@dataperpage int,@howmanyrecords int output as
Time of Update: 2018-12-08
複製代碼 代碼如下:<asp:TextBox ID="txtTempScenic" runat="server"></asp:TextBox> <ajax:AutoCompleteExtender ID="txtTempScenic_AutoCompleteExtender" runat="server" BehaviorID="AutoCompleteEx" DelimiterCharacters="" Enabled="True" ServicePath="~/
Time of Update: 2018-12-08
1、直接在前台調用 javascript 函數 很簡單,在 head 元素之間加入 script 元素,將 type 元素設定為 " text/javascript " 如: 複製代碼 代碼如下:<head runat="server"> <script type="text/javascript" > function ShowName(str) { alert("您的名字為:("+str+")"); } </script>