原创 使用DefaultButton 實現回車事件,可以有多個,甚至在用戶控件內也行
<asp:Panel ID="Panel2" runat="server" DefaultButton="Button21"> <asp:TextBox ID="TextBox10" runat="server" /><asp:Butt
原创 c#遞歸 讀取文件目錄,然後綁定treeview
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { TreeNode tp = ne
原创 C#讀取一個目錄,然後點擊其中一個節點動態加載他的子目錄和文件,節省開銷
using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Se
原创 開發自定義控件樣式(5)--webcontrol的獨立方法與樣式
using System;using System.Collections.Generic;using System.ComponentModel;using System.Text;using System.Web;using Syst
原创 最簡單的自定義控件(3)--與HtmlTextWriter有關的枚舉
using System;using System.Collections.Generic;using System.ComponentModel;using System.Text;using System.Web;using Syst
原创 上下鍵 切換聚焦控件
<script src="../gisjs/jquery-123.js" type="text/javascript" language="javascript"></script> <script type="text/jav
原创 b/s導出到excel
public void ToExcel() { StringBuilder strData = new StringBuilder(); strData.Append("<h3 align='ri
原创 .net 調用 office com導出excel
多年來 COM 對象一直是 Windows 編程的基礎,然而隨着技術的進步和發展,微軟推出了更佳出色的.NET。.NET Framework 提供了一個稱爲公共語言運行庫的運行時環境(CLR),它的託管執行過程,自動的內存管理,以及在版本
原创 支持斷點續傳﹐IE識的文件類型也不會在IE口中開啓
System.IO.Stream iStream = null;byte[] buffer = new Byte[10240];int length;long dataToRead;string filename = System.IO.
原创 兩個分頁存儲過程
drop proc [dbo].[UP_GetRecordByPage]goCREATE PROCEDURE [dbo].[UP_GetRecordByPage] @tblName varchar(255),
原创 ASP.NET生成層次較複雜的XML
.業務邏輯層: public DataSet ABCData() { DataBase db = new Da
原创 最簡單的自定義控件(2)--增加基本屬性
private string paymentMethodText = "Payment Method"; private string creditCardNoText = "CreditCardNoText";
原创 asp.net打印
B/S結構導致了Web應用程序中打印的特殊性。 ? 程序運行在瀏覽器中,打印機在本地,而文件確可能在服務器上,導致了打印控制不是很靈活。 ? 格式如何控制和定製等,是我們開發中可能會面對的問題。 打印文檔的生成 ? 1、客
原创 輸入文本自動提示
function autosuggestMatch(sText,arrValues) { var arrResult=new Array; if(sText!="") { for(var i=0;
原创 比較C#中的readonly與const
C#中有兩種常量類型,分別爲readonly(運行時常量)與const(編譯時常量),本文將就這兩種類型的不同特性進行比較並說明各自的適用場景。 工作原理 readonly爲運行時常量,程序運行時進行賦值,賦值完成後便無法更改,因