P
Pablo Gutierrez
I have a problem with the TABLE ASP NET control.
I'm trying to add rows and cells to an ASP:TABLE programmatically, but it
seems that when the table is filled is that way, the content is lost between
postbacks.
I'd like to fill the table only once (i.e. when Page.IsPostBack=False), but
the table must be filled dynamically since the number of rows and cells is
not known at design time.
Here are the pages:
ifraMenu.aspx
==========
<asp:table id="tblMenuL1" runat="server" CellSpacing="0" CellPadding="0"
Height="23px" Width="100%">
</asp:table>
ifraMenu.aspx.vb
============
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If (Page.IsPostBack=false) Then
.... Add rows and cells to table tblMenuL1
end if
....
End sub
===================================
I've tried using EnableViewState when creating the rows and the cells, but
anyway the rows and cells disappears at the first postback.
Is there any simple way to do this?
Regards,
Pablo.
I'm trying to add rows and cells to an ASP:TABLE programmatically, but it
seems that when the table is filled is that way, the content is lost between
postbacks.
I'd like to fill the table only once (i.e. when Page.IsPostBack=False), but
the table must be filled dynamically since the number of rows and cells is
not known at design time.
Here are the pages:
ifraMenu.aspx
==========
<asp:table id="tblMenuL1" runat="server" CellSpacing="0" CellPadding="0"
Height="23px" Width="100%">
</asp:table>
ifraMenu.aspx.vb
============
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If (Page.IsPostBack=false) Then
.... Add rows and cells to table tblMenuL1
end if
....
End sub
===================================
I've tried using EnableViewState when creating the rows and the cells, but
anyway the rows and cells disappears at the first postback.
Is there any simple way to do this?
Regards,
Pablo.