Hello,
I am having a problem which seems to be explainable if ViewStates uses not only the IDs but also the position of each control in the ASPX control tree to find the corrent viewstate info: I have an aspx with a set of 10 linkbuttons, inside an html table cell (basically, page numbers), and at the end a "Last Page" Link button. Another cell has a "Next Page" LinkButton. All of these have ViewState = True. Like this: TR TD 1 2 3 4 5 6 7 8 9 Last Page TD Next Page My OnPreRender code sets the CommandName for both the LastPage and NextPage buttons, and hiddes some of the page numbers when appropriate. Here I mean setting Visible=False, not Enable=False. When I try to navigate the results, and while debbuging the OnCommand event handler, I find that altough NextPage.CommandName has in it the value I set it to, LastPage.CommandName has NOT, it uses the value I set in the HTML. I tried putting each of these LinkButtons into separate TD's, and now LastPage.CommandName has a correct value. So: does ViewState use the Control Tree to store the values??? and if we change it from page to page we will have problems? I'll have to set some of those TD's to .Visible=false in order to get the layout I want, and I'm worrying the problem will just come back. I am seriously frustrated with all this webforms/postback/viewstate things. I start to feel I should just use ASPX like I used to program ASP. joćo martins Sorry about the cross-posting. -- Joćo Pedro Martins [EMAIL PROTECTED] |create|it| http://www.create.pt http://www.usabilidade.com You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.