I am developing a Web application using C# with asp.net. I have a sub-view in a Multiview control, which can be 3 states. I change an enumeration in code to determine the state of the page. This is done by clicking one of the three buttons. But my problem is, the button event will be fired after the page_load event, which loads the data of the page based on the enumeration, so the cycle goes as follows: Click Button -> Load Page -> change enumeration. So the changes won't be displayed. Only when i click the button a second time it shows the new data, because then the enumeration is changed and it loads. But I can't load the data in another event like Page_PreLoad because I'm dynamically creating controls with events, which won't work then. Thanks for helping!
Aucun commentaire:
Enregistrer un commentaire