當這些資料可能是動態產生的textbox(透過javascript),
此時我們該如何後端取得這些動態產生的HTML物件呢?
首先指定HTML物件的name 屬性.
例如:
name="txtName"
Dim adCourseBlock As New SqlDataAdapter Dim scmCourseBlockInsert As New SqlCommand With scmCourseBlockInsert .Connection = conn .Transaction = trans .CommandType = CommandType.StoredProcedure .CommandText = "RG_AddCourseBlockData" .Parameters.Add(New SqlParameter("@syear", SqlDbType.NChar, 3)).Value = cbObj.syear |
如何讓DataGrid有那種選到該列就變顏色的效果呢?
Step 1.
實作ItemCreated事件
Private Sub dgdBlockCourse_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgdBlockCourse.ItemCreated e.Item.Attributes.Add("onmouseover", "javascript:this.className='blueon'") e.Item.Attributes.Add("onmouseout", "javascript:this.className='blueoff'") e.Item.Attributes.Add("class", "White") End Sub |
最近有寫有關系統登入的部份,剛好看到董大偉先生的ASP.NET程式設計徹底研究(這本書很不錯)
有一個範例是有關登入的機制,之前寫J2EE時並沒有用過這個用法…
第一:
先建立有關使用者登入的物件
Public Class LoginObj
Private _emp_no As String = "" ' 使用者帳號
......
' 使用者帳號
描述一位熱愛美式足球的大學生力爭上游的求學過程
沒有壯闊的大場面,也沒有卡斯強大的陣容
男主角最後上場的那一幕,實在感動人心
魯迪傳奇(RUDY)該片為真人真事改編的運動電影
而男主角Sean Astin就是魔戒裏的配角(哈比人)之一