Basic Question about asp:Table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stoogots2
    New Member
    • Sep 2007
    • 77

    Basic Question about asp:Table

    If I am adding rows to a table I have created (using the designer) in my code-behind, I am doing a Table.Rows.Coun t after the onClick event and even though the table definition properties are set such that EnableViewstate =true, the table rows.count is zero on it's return to the server. I thought that if viewstate was enabled for a control that I would be able to access the rows of the control (in this case an asp: table) on postback.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Try saving the table in ViewState like so:

    ViewState("myTa ble")=myTable

    Comment

    Working...