Time of Update: 2018-12-05
using System.Security.Cryptography;using System.Text;using System.IO;加密 DES#region 加密 DES public string Encrypt(string pToEncrypt, string sKey) { DESCryptoServiceProvider des = new DESCryptoServiceProvider(); //
Time of Update: 2018-12-05
ASP.Net中利用CSS實現多介面兩種方法。 方法一: <%@page language="C#"%> <%@import namespace="System.Data"%> <script language="c#" runat="server"> public void page_load(Object obj,EventArgs e) {
Time of Update: 2018-12-05
1.在.net下建立一個類庫,再添加一個類檔案2.定義一個介面,並給介面添加一個GUID[Guid("47E62378-B300-43f6-BDB4-0DEAC60F8EB6")]public interface IEncrypt{ string MyEncoding(string ss); string MyDecoding(string ss);}3.實現介面 [Guid("532FF790-079A-4e2b-AB1E-6DFC7E1DFD21")] public class
Time of Update: 2018-12-05
ASP.NET 2.0包含兩個圖形控制項,一個Image,一個是ImageMap控制項。1、Image控制項是用來顯示圖象的,對應於<img />標籤,典型的Image控制項格式如下 <asp:Image id="imgRandom" ImageUrl="Picture.gif" AlternateText="Picture" DescriptionUrl=""
Time of Update: 2018-12-05
Set fso = Server.CreateObject("Scripting.FileSystemObject") Set fout = fso.Createtextfile(server.mappath("..\eshop\view\"&rs("bname")),true) fout.writeline okfilefout.closeFiLePaTh =
Time of Update: 2018-12-05
<%'禁止網頁緩衝Response.Buffer = TrueResponse.ExpiresAbsolute = Now() - 1Response.Expires = 0Response.CacheControl = "no-cache"'驗證碼產生dim yz2randomize timeryz2=Int((8999)*Rnd +1009)session("ok")=yz2%>刪除檔案 iFileName 檔案名稱 iPath 檔案路徑<% '有關檔案操作 'Power
Time of Update: 2018-12-05
隨機產生N位由數字和字母組成的密碼 asp隨機數<% Randomize Do While Len(pass)<12 ’隨機密碼位元 num1=CStr(Chr((57-48)*rnd+48)) ’0~9 num2=CStr(Chr((90-65)*rnd+65)) ’A~Z num3=CStr(Chr((122-97)*rnd+97)) ’a~z pass=pass&num1&num2&num3 loop %> <%=pass%>
Time of Update: 2018-12-05
Database Backup和還原,在項目開發中很多客戶都需要的功能。他們希望,點擊備份按鈕時,就可以把備份的資料庫下載到本地儲存。點擊還原按鈕時,把本地的資料庫還原到伺服器上。雖然這樣很不安全,但是在區域網路內也是很有必要的。這裡運用到了幾個知識點。1:Database Backup,和還原(這裡指Sql server)2:檔案的上傳和下載。(為什麼要用到檔案上傳和下載呢?這裡有個很值得注意的問題,而且我在做項目時也經常會疏忽。我們在測試Database
Time of Update: 2018-12-05
Time of Update: 2018-12-05
找了好久,總於調通了asp.net 串連interbase.放上來與大家一起分享.....string strConn = "database=127.0.0.1:D:\\建立檔案夾\\home_db.ib;assembly=Borland.Data.Interbase,Version=2." + "0.0.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b;vendorclient=gds32.dll;pro"
Time of Update: 2018-12-05
學習asp.net 差不多半年了,一直沒多大的成就,現在只能做些簡單的企業網站,因為本身工作是網管,學編程是半路出家的,近段時間一直在微軟的幾個入門例子,像Microsoft .NET PetShop 3.0等....感覺好多看不懂,以前練習寫asp.net程式時,都只是做一層結構,最多是加上使用者控制項...看的過程中很多迷惑不解,Microsoft .NET PetShop 3.0雖然是入門的例子,對.net
Time of Update: 2018-12-05
1.簡單資料繫結定 <!--ASP.NET 1.x data binding expression --><%# DataBinder.Eval(Container.DataItem, "Price") %><!--Equivalent ASP.NET 2.0 data binding expression --><%# Eval("Price") %><!--XML data binding --><%#
Time of Update: 2018-12-05
在 Visual Web Developer 2005 Express Edition 中可以建立資源檔(Resource File),我們可以向其中存入字串、圖片、表徵圖、文字檔等內容,並且可以在 ASP.NET 中使用資源檔。資源檔的副檔名是 .resx,在表單軟體中,可以利用 ResXResourceReader 來直接讀取 .resx 檔案。但是在 ASP.NET 中,我們不能這樣做,我們需要利用 ResGen.exe 將 .resx 產生二進位的
Time of Update: 2018-12-05
第一本:ASP.NET AJAX in Action (Paperback) by Alessandro Gallo (Author), David Barkol (Author), Rama Vavilala (Author), Scott Guthrie (Foreword), Bertrand Le Roy (Foreword) Paperback: 600 pagesPublisher: Manning Publications (August 15, 2007)Language:
Time of Update: 2018-12-05
轉自:http://weblogs.asp.net/scottgu/archive/2011/02/22/mvcconf-videos-available.aspxBelow are links to free recordings of the talks that you can watch (and optionally download): Scott Guthrie Keynote The NuGet-y Goodness of Delivering Packages (Phil
Time of Update: 2018-12-05
在ASP.NET中增加GLOBAL.ASAX檔案,此檔案中所增加的內容(變數及函數)具有全域範圍,代碼如下:<%@ Application Language="C#" %><script runat="server"> System.Timers.Timer tmr = new System.Timers.Timer(1000*60); void Application_Start(object sender, EventArgs e) {
Time of Update: 2018-12-05
1、由dataset產生 public void CreateExcel(DataSet ds,string typeid,string FileName) { HttpResponse resp; resp = Page.Response; resp.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312"); resp.AppendHeader("Content-Disposition",
Time of Update: 2018-12-05
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FileUpload.aspx.cs" Inherits="EM_FileUpload" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html
Time of Update: 2018-12-05
建立傳出的URL(Outgoing URLs)處理傳入的URL(Incoming URLs)僅僅是路由系統的一部分功能。我們也需要使用URL架構來建立Outgoing URLs,我們可以將這些URL嵌入到我們的View裡面,並且能夠讓使用者點擊URL提交表單給我們的應用程式,並能夠命中合適的controller和action。下面會展示用不同的技術來建立Outgoing URLs:最便捷的建立Outgoing URLs就是手動定義如:<a
Time of Update: 2018-12-05
前面給SportsStore添加了分頁的功能。接著我們添加導航控制,通過左邊的菜單來分類顯示資料。首先修改SportsStore.WebUI.Models下的ProductsListViewModel.cs,增加一個CurrentCategory屬性public string CurrentCategory{get;set;}。接著修改List action方法,能夠通過傳入的CurrentCategory來過濾查詢的產品列表。修改後的List action方法如下所示:public