Dynamically created controls causing Null reference

后端 未结 5 1606
情深已故
情深已故 2021-01-07 15:26

I am trying to dynamically create controls and give them properties during run time.

I have put my code inside the Page_Init event, when I run my website I can see m

5条回答
  •  执念已碎
    2021-01-07 16:03

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            //-- Create your controls here
        }
    

提交回复
热议问题