ASP.Net: User controls added to placeholder dynamically cannot retrieve values

前端 未结 8 1745
攒了一身酷
攒了一身酷 2021-02-09 02:53

I am adding some user controls dynamically to a PlaceHolder server control. My user control consists of some labels and some textbox controls.

When I submit the form

8条回答
  •  闹比i
    闹比i (楼主)
    2021-02-09 03:32

    As others have said, any form of control manipulation must be done before viewstate is created.

    Here is a good link on the page lifecycle to help you out:

    http://msdn.microsoft.com/en-us/library/ms178472.aspx

提交回复
热议问题