T
Tina
This message refers to the one I left an hour ago. It's another way to ask
a question that will help me solve my problem.
Below is a working ASPX program. It has two buttons and a DataGrid named dg
on it. There is a dataadapter and an associated typed dataset that is the
source to the datagrid. All a very typical program. When button one is
pushed the grid gets filled. When button 2 is pushed dg IS STILL
THERE(thats good of course). Why is it still there? Each time a form is
used it is destroyed. What restores dg? There is no code in the " web form
designer generated code" that restores it. How does the dg object get
rebuilt?
thanks,
T
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
daCustLogin.Fill(DsCustlogin1)
dg.DataBind()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Dim dgItem As DataGridItem
For Each dgItem In dg.Items
Dim mystring As String
mystring = dgItem.Cells(0).Text
Next
End Sub
a question that will help me solve my problem.
Below is a working ASPX program. It has two buttons and a DataGrid named dg
on it. There is a dataadapter and an associated typed dataset that is the
source to the datagrid. All a very typical program. When button one is
pushed the grid gets filled. When button 2 is pushed dg IS STILL
THERE(thats good of course). Why is it still there? Each time a form is
used it is destroyed. What restores dg? There is no code in the " web form
designer generated code" that restores it. How does the dg object get
rebuilt?
thanks,
T
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
daCustLogin.Fill(DsCustlogin1)
dg.DataBind()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Dim dgItem As DataGridItem
For Each dgItem In dg.Items
Dim mystring As String
mystring = dgItem.Cells(0).Text
Next
End Sub