One thing to remember when working on a Web Part for SharePoint is that it is always a problem handling postbacks in a proper way. Your Web Part is probably not the only one on the page and therefore your check on IsPostBack() in the Page_Load event handler can often result in inappropriate behavior.
Sometimes, when checking on the PostBack you want to make sure that it was a postback initiated by your Web Part. In one of the Web Parts we have created for a customer we use a toolbar to display some buttons to the user. When the user clicks on the button, we want to launch a specific action within the Web Part. In this case, if the user is an administrator, she can configure her own alerts or the alerts for the users having access to the site.
So, depending on the button selected (My Mode or All Mode) we display a different view in the treeview. Which one? Ok, you can trap the server-side event but these are fired after your Page_Load is executed. Maybe that is too late :)
One way of knowing in the Page_Load event handler what button was pushed is by checking the __EVENTTARGET form variable. Something like this:
if((Request.Form["__EVENTTARGET"]!=null) &&
(Request.Form["__EVENTTARGET"].ToString().IndexOf("myModeButton")>-1))
Your button actually has a name that is the concatenation of the ClientID of the Web Part and the ID you gave to the control yourself. For a confirmation, just view the source of the page rendered in the browser. To make sure that it is really your button, you could thus also verify this client ID part in your code.