Time of Update: 2018-12-06
Supported Types for Parameter Maps and Result Maps (.NET) (.NET)" border="1">CLR TypeObject/Map Property MappingResult Class/Parameter Class**Type Alias**System.ArrayListYesYeslistSystem.BooleanYesYesBoolean, boolSystem.ByteYesYesByte,
Time of Update: 2018-12-06
如果你是根據參數來插入資料的話可以用此方法 protected void Page_PreInit(object sender, EventArgs e) { if (Request.QueryString["id"] != null) { SqlCommand cmd = new SqlCommand("insert into jobs values(@job_desc,@min_lvl,@max_lvl)", con);
Time of Update: 2018-12-06
Data Map (.NET):Example:<?xml version="1.0" encoding="UTF-8" ?> <sqlMap namespace="Product" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > <alias> <typeAlias alias="Product"
Time of Update: 2018-12-06
可以快取頁面面的一個檔案或一組檔案,設定依賴,但檔案被改時,緩衝失效aspx在頭的地方寫<%@ OutputCache VaryByParam="none" Duration="9999" %>可以在此調用時間方便知道是否緩衝 <%=DateTime.Now.ToString("T")%> protected void Page_Load(object sender, EventArgs e) {
Time of Update: 2018-12-06
返回自增列的值<!—Oracle SEQUENCE Example using .NET 1.1 System.Data.OracleClient --> <insert id="insertProduct-ORACLE" parameterClass="product"> <selectKey resultClass="int" type="pre" property="Id" > SELECT STOCKIDSEQUENCE.NEXTVAL
Time of Update: 2018-12-06
轉載請註明出處:http://www.cnblogs.com/dzodzo/archive/2009/12/15/1624225.html PDF版:http://www.fsderno.com/pdf/complier1.pdf 引入 正在上編譯原理的課程,為了對抗遺忘,寫下這篇文章加強自己的記憶,同時也希望能給大家帶來協助。 在編譯原理中,要把Regex轉化為DFA,其中有一步就是要計算文法分析樹上各結點的nullable、firstpos、lastpos和followpos。如果不理解
Time of Update: 2018-12-06
//刪除提醒function alertMessage(f){ //f = document.Form1 var flag=false; for(var i=0;i<f.length;i++) { var e = f.elements[i]; if(e.type=="checkbox") { if(e.checked) {
Time of Update: 2018-12-06
本人是菜鳥看了webabcd兄的在GridView中插入新記錄文章感覺非常好~但我不太喜歡用資料來源控制項綁定,所以自己做了一個自己的手動綁定資料的~開始遇到一個疑問就是找空白模版的控制項ID的問題~後來在網上找到解決方案了,好把代碼放出希望能協助大家 protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { bind(); }
Time of Update: 2018-12-06
function CheckBoxSelect(f) { //f = document.Form1 if(document.getElementById("btnAll").value=="選擇全部") { event.srcElement.value="取消全部"; for(var i=0;i<f.length;i++) { var e = f.elements[i]; if(e.type=="checkbox")
Time of Update: 2018-12-06
.NET中的資料類型和iBATIS.NET設定檔資料類型的比較:CLR TypeAliasSystem.ArrayListlistSystem.BooleanBoolean, boolSystem.ByteByte, byteSystem.CharChar, charSystem.DateTimedateTime, dateSystem.DecimalDecimal, decimalSystem.DoubleDouble,
Time of Update: 2018-12-06
對象關係映射(Object Relational Mapping,簡稱ORM)是一種為瞭解決物件導向與關聯式資料庫存在的互不匹配的現象的技術。 簡單的說,ORM是通過使用描述對象和資料庫之間映射的中繼資料,將java程式中的對象自動持久化到關聯式資料庫中。本質上就是將資料從一種形式轉換到另外一種形式。 這也同時暗示者額外的執行開銷;然而,如果ORM作為一種中介軟體實現,則會有很多機會做最佳化,而這些在手寫的持久層並不存在。
Time of Update: 2018-12-06
<configSections> <section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </configSections> <nhibernate&g
Time of Update: 2018-12-06
資料表:CREATE TABLE [dbo].[ID_CODEID] ( [ID] [int] IDENTITY (1, 1) NOT NULL , [ID_NAME] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL , --表名 [ID_VALUE] [int] NOT NULL --類比的
Time of Update: 2018-12-06
關於跨頁面擷取值的方法目前個人用的最多有以下幾種方法1. 使用瀏覽器以編程方式重新導向或者超連結default.aspx頁面response.redirect("default1.aspx?id=1&name='luca'");default1.aspxstring name=request.querystring("name");超連結就是 控制項或<a>傳值方式和上面相同個人心得 注:不能傳敏感性資料2. 使用工作階段狀態session["name"]="luca"
Time of Update: 2018-12-06
IBatisNET是從Java的IBatis開源項目轉過來的,IBatisNET可以為你的應用設計一個更好的資料持久層。其大概架構如: Table 4.1. Folders found in the iBATIS.NET source distributionFolder nameDescriptionExternal-BinDependency assemblies provided for your convenience.IBatisNet.CommonAssembly of
Time of Update: 2018-12-06
擷取主版頁面的相關內容有兩種方法1 通過findcontrol找控制項ID 需要在此事件中~因為Page_load中時是先內容頁載入然後才是主版頁面載入 protected void Page_LoadComplete(object sender, EventArgs e) { Label2.Text = "現在時間是" + (Master.FindControl("Label1") as Label).Text; if
Time of Update: 2018-12-06
在VS.NET2003中使用iBATIS.NET,添加SqlMap.xsd, SqlMapConfig.xsd, providers.xsd三個檔案到C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml這樣在編輯iBATIS.NET設定檔時,有提醒出現,更易用。如下所示:SqlMap.Config 設定檔樣本,(此檔案放在web.config同目錄)<?xml version="1.0
Time of Update: 2018-12-06
用戶端<script language="javascript" type="text/javascript"> function clearControl() { var Input=div1.getElementsByTagName("input"); for(var i=0;i<Input.length;i++) { if(Input[i].type=="text")
Time of Update: 2018-12-06
我用的是Table控制項,我有個需求Table每行顯示10張圖片,我所有的圖片已經封裝在IList<string>imglist=new list<>();首先我擷取了有多少張圖片並算出會有多少行 //圖片的數量int count = imglist.Count;//計算會有多少行int rowCount = count % 10 > 0 ? count / 10 + 1 : count / 10;接著代碼如下 //首先動態載入行
Time of Update: 2018-12-06
Treeview中ontreenodepopulate是一個很好的事件,當你點擊樹的某個節點時調入資料庫展現此節點下的資料,並且無重新整理,當樹展現的資料多的時候就可以用此方法如MSDN的樹,但如果資料不多的時候沒有必要用此方法,因為要頻繁調資料庫好閑話少說由於是使用者控制項所以把 treeview的部分屬性和事件公用,方便用此控制項的頁面調用頁面 TreeDept.ascx<%@ Control Language="C#" AutoEventWireup="true" CodeFile=