Where should I initialize a web form user control in it's container page?

623 Views Asked by At

I have a web form called addresspage.aspx which contains a user control called addresscontrol.ascx. There are properties exposed by addresscontrol.ascx like ZipCode.

I have to achieve two things.

  • Read the ZipCode query string from the URL (http://localhost/checkout/addresspage?zipcode=00000) and populate the addresscontrol
  • If there is no ZipCode in the query string, redirect to the cart page.

Where can I do the above two in the aspx page cycle events in the addresspage.aspx? I know Page_Load and Page_Init but don't know where for the above two.

0

There are 0 best solutions below