What are the available ways to pass a parameter to a UserControl ?
I know the session option but actually I don’t prefer it because it’ll retain when any exception is occurred. I mean I prefer something like the QueryString (rely on the call or request).
Note: My UserControl will be shown throught a modal popup using JQuery.
Create a public property on the UserControl, then set that property’s value on the page the UserControl lives. Since UserControl events occur before the page’s events (except for the Page_Load event – the page’s Load starts before the UserControl, set the value of the property in your Page_Load (or earlier) event.