- 2010-04-14
1.EditPlus:文字處理軟件 EditPlus是一款功能強大的文字處理軟件。它可以充分的替換記事本,它也提供網頁作家及程序設計師許多強悍的功能。支持HTML、CSS、PHP、ASP、Perl、C/C++、Java、JavaScript、VBScript等多種語法的著色顯示。程序內嵌網頁瀏覽器,其
- 2010-04-13
ASP.NETImageGeneration內置了ImageResizeTransform類,可以實現圖片大小調整功能。也可以擴展ImageTransform實現自己的圖片變換類。 下面使用ASP.NETImageGeneration生成圖片縮略圖及水印的代碼。 數據庫: CREATETABLEt_images ( image_idINT, image_dataIM
- 2010-04-13
1.利用新浪提供給的iframe直接嵌入,這種方式非常的簡單,但是卻沒有交互性。代碼如下: iframeframeborder=0src=http://php.weather.sina.com.cn/widget/weather.phpscrolling=nowidth=246height=360/iframe 2.抓取當天的天氣,以指定格式輸出。
- 2010-04-13
ADO.NET提供了多種對象模型,比較典型的以下有五種,它們全部歸類在System.Data.SqlClient名稱空間下。 一、SqlConnection對象 ADO.NET使用SqlConnection對象與SQLServer進行連接。連接字符串的常用形式有兩種: 1.使用Windows集成安全身份認證,例如:strin
- 2010-04-12
程序開發中經常會要用到checkbox的全選,通常情況下是在一些數據綁定控件中如gridview等。下面以repeater為例,在repeater的header和item中放入checkbox控件 asp:RepeaterID=rptGrouprunat=server HeaderTemplate tablewidth=100%cellspacing=1class
- 2010-04-11
在大多數的基于數據庫的身份認證登陸模塊,大多數的程序員只是用一個簡單的SQL查詢語句來實現,這樣很容易被用戶以簡單的 (1’or’1’=’1) 查詢替換給破解.其實只要稍微的修改一下代碼,便可以防止.具體請參看以下兩個函數的實現: 以下代碼基于C#,數據庫為Acce
- 2010-04-10
usingSystem; usingSystem.Data; usingSystem.Configuration; usingSystem.Collections; usingSystem.Web; usingSystem.Web.Security; usingSystem.Web.UI; usingSystem.Web.UI.WebControls; usingSystem.Web.UI.WebControls.WebParts; usingSystem.Web.UI.H
- 2010-04-09
前臺引用.aspx: imgid=Image1onclick=javascript:suiji();src=YanZhengCode.aspxalt=看不清楚,請單擊我。border=0style=height:25px;width:60px;border:0px;cursor:pointer;/ scriptlanguage=javascripttype=text/javascript functionsuij
- 2010-04-06
使用環境:WindowsXPProfessional 開發平臺:NET2.0,VS2005 已經過測試,實現了偽靜態技術的實現,可以實現諸如Show.aspx?MyID=1成功轉換為1.html的轉換,現在將成果與大家分享一下: 引入:我們為什么不直接使用Show.aspx?MyID=1這種訪問方式而非要使用1.html這
- 2010-04-05
// C# 寫讀Cookie 第一:寫Cookies Response.Cookies[UserName].Value=Guest; Response.Cookies[UserName].Expires=DateTime.Now.AddDays(1); 第二:添加Cookies HttpCookieuserName_zhengshu_Cookie=newHttpCookie(uname); userName_zhengshu_Cookie
- 2010-04-04
效果圖: 圖1-未格式化前 圖2-格式化后 解決方法: 在asp.net2.0中,如果要在綁定列中顯示比如日期格式等,如果用下面的方法是顯示不了的 asp:BoundFieldDataField=CreationDate DataFormatString={0:M-dd-yyyy} HeaderText=CreationDate/ 主要是由于ht
- 2010-04-02
在Asp.netMVC1.0正式版中的模板頁中提供了:asp:ContentPlaceHolderID=TitleContentrunat=server/ 這樣可以讓你在每個View中獨立設定頁面標題(Title),不過這樣的弊端就是假如我的頁面標題是如下形式:統一標題-副標題 那么要在每個View中都寫上:日記
- 2010-03-30
效果圖: 后臺代碼: usingSystem; usingSystem.Data; usingSystem.Configuration; usingSystem.Collections; usingSystem.Web; usingSystem.Web.Security; usingSystem.Web.UI; usingSystem.Web.UI.WebControls; usingSystem.Web.UI.WebControls.WebParts; u
- 2010-03-29
調試Asp.net程序時,出現了“訪問IIS元數據庫失敗”的錯誤信息,解決方法如下: 1、依次點擊“開始”-“運行”。 2、在“運行”欄內輸入 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe-i(不含引號),然后點“確定”按鈕。 3、出現的
- 2010-03-28
1.使用QueryString變量 QueryString是一種非常簡單的傳值方式,他可以將傳送的值顯示在瀏覽器的地址欄中。如果是傳遞一個或多個安全性要求不高或是結構簡單的數值時,可以使用這個方法。但是對于傳遞數組或對象的話,就不能用這個方法了。下面是一個例子: a
- 2010-03-28
有的時候我們需要在項目的某個東西需要用到加密算法MD5也許是最長用到的了 usingSystem.Security.Cryptography; usingSystem.Text; //要添加上面的引用 publicstringmd5(stringstr) { MD5m=newMD5CryptoServiceProvider(); byte[]s=m.ComputeHash(UnicodeEnc
- 2010-03-26
假如你有一個表hobby_tab 要把一個dropdownlist綁定到這個表上 那就可以使用 privatevoidinitHobbyDDL() { stringQueryStr=select*fromhobby_tab; DataSetds=SqlHelper.ExecuteDataSet(SqlHelper.conStr,CommandType.Text,QueryStr,null); xingqu.DataSourc
- 2010-03-24
styletype=text/css @mediaprint//表示打印的時候。 { #nok{display:none;}//表示id為nok的控件不顯示。 } /style divstyle=text-align:right;id=nok 已經上了 %=shke.ToString()% 節課,還 %=noke.ToString()% 節課沒有上。 /div 這樣寫:主要是方便瀏
- 2010-03-23
///summary ///從Excel讀取數據 ////summary ///paramname=filePath路徑/param ///returnsDataSet/returns publicDataSetImportFromExcel(stringfilePath) { DataSetds=newDataSet(); stringconnString=Provider=Microsoft.Jet.OLEDB.4.0;DataSource=+fil
- 2010-03-22
EhtmlPUBLIC-//W3C//DTDXHTML1.0xhtml1-transitional.dtd htmlxmlns=1999/xhtml HEAD titleMyGoogelMap/title scriptsrc=http://maps.google.com/maps?file=apiamp;v=2amp;