我是新來的這個編程領域(ASP.NET VB),我想知道如果有人有我的一腳踢開始,這樣我就可以讓我的事情在我的末端移動我將不勝感激!我目前正在使用代碼在Gridview中選擇整行(PatientName & Room),而沒有「選擇」按鈕(下圖)。然後我想將這些從行中傳遞到下一頁。接收頁面將包含兩個標籤。這是我迷失的地方。選擇Gridview行 - 發送到下一個頁面
我知道這裏有一些例子,但我找不到適合我的例子,除非有人能指出我正確的方向。謝謝
Private Sub GridView1_RowCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowCreated
'Allows you to "select"/Highlight a row without a select button
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Attributes("onmouseover") = "this.style.cursor='pointer';this.style.backgroundColor = '#87CEFF';"
e.Row.Attributes("onmouseout") = "this.style.textDecoration='none';this.style.backgroundColor = '#FFFFFF';"
e.Row.ToolTip = "Click to select row"
e.Row.Attributes("onclick") = Me.Page.ClientScript.GetPostBackClientHyperlink(Me.GridView1, "Select$" & e.Row.RowIndex)
End If
End Sub