Time of Update: 2018-12-07
本文講 ASP.NET的MD5和DES加密和解密演算法#region MD5演算法 public string md5(string str, int code) { if (code == 16) //16位MD5加密(取32位加密的9~25字元) { return
Time of Update: 2018-12-07
//取得上傳檔案的大小 int FileLen = fileImg.PostedFile.ContentLength; Byte[] FileData = new Byte[FileLen]; //建立訪問用戶端上傳檔案的對象 HttpPostedFile hp = fileImg.PostedFile; //建立資料流對象 Stream sr =
Time of Update: 2018-12-07
資料庫結構Tb_department表D_ID 部門編號D_Name 部門名稱D_Tel 聯絡電話D_Address 聯絡地址D_Chief 負責人,D_Belong 所屬部門Tb_employee表E_ID 職工編號E_Name 職工姓名E_Sex 職工性別E_Tel 聯絡電話E_Address 聯絡地址E_Birth 出生年月D_Name 所屬部門前台aspx<asp:TreeView ID="TreeView1" runat="server" ImageSet="Faq"
Time of Update: 2018-12-07
ASP.NET的DataGrid大量新增資料在以前的一個學校項目中,學生管理系統中應用了ASP.NET的DataGrid大量新增資料,應用DataGrid的迴圈添加資料for (i = 0; i < (int)this.MyDataGrid.Items.Count; i++){//處理}瀏覽資料添加資料資料庫表資料學生表stu_Information [id] [nvarchar] [name] [nvarchar] [sex] [nvarchar] [birth]
Time of Update: 2018-12-07
ExecuteScalar和ExecuteNonQuery 如果想返回像Count(*)、Sum(Price)或Avg(Quantity)的結果那樣的單值,可以使用 Command.ExecuteScalar。ExecuteScalar返回第一行第一列的值,將結果集作為標量值返回。因為單獨一步就能完成,所以 ExecuteScalar不僅簡化了代碼,還提高了效能;要是使用DataReader就需要兩步才能完成(即,ExecuteReader+取值)。
Time of Update: 2018-12-07
Technorati 標籤: HTTP500,IIS7,Godaddy今天在使用Godaddy.com的windows主機時,出現了以下錯誤: Error Summary HTTP Error 500.22 - Internal Server ErrorAn ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.Detailed Error Information
Time of Update: 2018-12-07
問題描述:在一個頁面裡建立多個按鈕,其中預設情況下按鈕事件與資料驗證控制項衝突:當其中的一個按鈕被點擊後想要特定的validator被激發而不是頁面中的所有validator。而其他按鈕則不需要validator。此時會都會啟用資料驗證控制項。 說明:在ASP.NET 1.1中除了hack
Time of Update: 2018-12-07
此方法適合ASP.NET(C#)+OracleOracle 表中欄位類型為Blob#region 上傳檔案(二進位) // static public Byte[] FileToBinary(FileUpload hifile) { try { if (hifile.HasFile) { if
Time of Update: 2018-12-07
幾款ASP.NET線上文字編輯器1,FCKeditor 編輯器最新版本: 2.3.1網站:http://www.fckeditor.net示範:http://www.fckeditor.net /demo特點:開源、免費 支援絕大多數瀏覽器支援語言多ASP.Net * ASP * ColdFusion * PHP * Java * Active-FoxPro * Lasso * Perl *
Time of Update: 2018-12-07
using System;using System.Collections.Generic;using System.Text;using System.Net;using System.Text.RegularExpressions;using System.Diagnostics;using System.Runtime.InteropServices;using System.Management;using System.Management.Instrumentation;using
Time of Update: 2018-12-07
執行階段錯誤 說明: 伺服器上出現應用程式錯誤。此應用程式的當前自訂錯誤設定禁止遠程查看應用程式錯誤的詳細資料(出於安全原因)。但可以通過在本機伺服器電腦上啟動並執行瀏覽器查看。 詳細資料: 若要使他人能夠在遠端電腦上查看此特定錯誤資訊的詳細資料,請在位於當前 Web 應用程式根目錄下的“web.config”設定檔中建立一個 <customErrors> 標記。然後應將此 <customErrors> 標記的“mode”屬性設定為“Off”。修改如下:<!--
Time of Update: 2018-12-07
using System;using System.Collections.Generic;using System.Text;using System.IO;using System.Drawing;using System.Drawing.Imaging;namespace ImageProcess{ /// <summary> /// ImageThumbnail 的摘要說明 /// </summary> public class
Time of Update: 2018-12-07
之前是做301定向是在每個頁面調用一個方法的,原文http://www.cnblogs.com/hakuci/archive/2010/11/19/1881681.html 現在利用Web.config的HttpModule 實現整站301永久重新導向 具體方法如下:1在web.config加入配置<configuration> <appSettings> <add key="WebDomain" value="wecanwecan.com"/>
Time of Update: 2018-12-07
Technorati 標籤: asp.net,php,asp,jsp,301重新導向介紹一下針對各類程式系統實施301重新導向的代碼:1、Linux主機重新導向Godaddy的Liunx主機,Godaddy本身已經支援Apache,所以直接建立一個.htaccess檔案就可以了,一般來說,在本地無法建立.htaccess的時候可以先建立一個txt格式檔案,上傳到根目錄的時候再重新命名為“.htaccess”就可以了。網上很多如何進行
Time of Update: 2018-12-07
一、out這是一個引用傳遞。 原則一:當一個方法(函數)在使用out作為參數時,在方法中(函數)對out參數所做的任何更改都將反映在該變數中。 原則二:當希望方法返回多個值時,聲明 out 方法非常有用。使用 out 參數的方法仍然可以返回一個值。一個方法可以有一個以上的 out 參數。 原則三:若要使用 out 參數,必須將參數作為 out 參數顯式傳遞到方法。out 參數的值不會傳遞到 out 參數。 原則四:不必初始化作為 out 參數傳遞的變數,因為out
Time of Update: 2018-12-07
在ASP.NET中應用微軟AJAX技術,把GridView在UpdatePanel裡匯出Excel時會出現的錯誤。就是在ASP.NET2.0架構中當用GridView匯出Execl的時候,會發生只能在執行 Render() 的過程中調用 RegisterForEventValidation的錯誤提示。 方法一:(好像還是不行)在ajax裡面Response.Write會有衝突,你得為UpdatePanel添加 <triggers> 屬性,把ControlID指嚮導出按扭的ID
Time of Update: 2018-12-07
在ASP.NET Atlas中使用Profile Service儲存使用者資訊English Version: http://me.dflying.net/2006/04/using-profile-service-in-aspnet-atlas.html作者:Dflying Chen (http://dflying.cnblogs.com/)我們知道ASP.NET
Time of Update: 2018-12-07
ASP.NETRegex 驗證各種字元的類namespace ToolKit{ using System; using System.Text.RegularExpressions; public class ValidatorHelper { /// <summary> /// Email /// </summary> /// <param
Time of Update: 2018-12-07
ASP優點:1. 無需編譯2. 易於產生3. 獨立於瀏覽器4. 物件導向5. 與任何ActiveX scripting 語言相容6. 來源程式碼不會外漏缺點:1、Windows本身的所有問題都會一成不變的也累加到了它的身上。安全性、穩定性、跨平台性都會因為與NT的捆綁而顯現出來。2、ASP由於使用了COM組件所以它會變的十分強大,但是這樣的強大由於Windows
Time of Update: 2018-12-07
解決ASP.NET應用AJAX的CascadingDropDown回傳或回調參數無效本例子是級聯下拉效果,出現了“回傳或回調參數無效”問題,結合網上的介紹和自己的測試,下面就講講:頁面aspx代碼 <tr> <td align="right" style="height: 50px; width: 300px;"> 系別 </td>