Your post needs a little more clarification..
What treeview component are you using?
I'm not sure what you mean by "master pages", do you mean default pages?
Most likely you'll have to pass parameters through your query string and update your desired treeveiw node.
You can find a good treeview component at: http://www.obout.com/t2/download.aspx