Lazy loading ascx UserControl (or something else) at loadtime

I wanted to make an ascx usercontrol “lazy” load when it´s loading on aspx page. So I´m really using the ascx as a view (if you know about MVC you´ll get that) that only acts when it receives data.
So the thing I was after was something like…

The user makes a choice of a customer from a dropdown on the main page like:

That makes the view go into “lazy loading” mode showing the updateprogress as shown above.

And finally when the data has been loaded the control shows the data, like so:

Things to notice here is the asp:Timer control, here is where the magic happens. Another thing to notice is that I disable the ViewState (using VS 21010 if you are wondering about the “new” syntax), otherwise the paging won´t work as expected on the GridView. (I spent a few hours on that I can tell you).

Things to notice here is that when the view (ascx) receives the data (the Customer setter property) I enable the Timer which makes it go into the Tick event which shows the updateprogess since it is an async event. In that method I load up that data from the customer (via customer.Orders) and finally I databind the GridView which in turn calls to the selecting event which can now deal with the Linq expression I´m using to bind my data.

The final thing is to push data into my view, which is made from the page like:

I just want to mention I’m new to blogging and certainly enjoyed this blog site. Very likely I’m want to bookmark your website . You surely have good well written articles. Appreciate it for sharing with us your website.