User Control - Check if Initialized / Being loaded for the first time????

L

Lucas Tam

Hi all,


I am dynamically loading user controls after a postback. Within the User
Control, how do I check if it is being loaded for the first time?

With a regular ASPX page I can check If Not Page.IsPostback, however, since
these controls are loaded AFTER postback, this won't work.

I tried using Viewstate, but since I'm swapping multiple controls, I'll
need to manage the Viewstate variable... and that makes it troublesome.

Is there any property to check to see if a User Control is being loaded for
the first time?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top