Hello I apologize because my English is not good. I Have a webpage by asp.net that contain one treeview ,xmldatasource,one xml file that related to xmldatasource and one iframe. When user click on a treenode a webpage will be shown in iframe. Now I want when treenodes clicked , my url (e.g "www.mysite.com/default.aspx") change to ("www.mysite.com/default.aspx?onenode") and if I directly enter this url ("www.mysite.com/default.aspx?onenode") on browser mypage shown and that treenode is selected and page(onenode) is shown on iframe . there a way to solve the my problem there? I am waiting for your help. Thank you for Perpend.
I would avoid the use of IFRAMEs and use AJAX to render the treenode detail instead. That way you are dealing with just one web page, rather than two, making your problem go away.
I suppose you can easily do this by using the NavigateUrl
property of the TreeNode
to set the target URL. (You can construct this based on the Text/Value
properties of the current TreeNode.
Also, you can set the target frame in which the page is to be loaded by setting the Target
property of the TreeNode. In your case, it seems you would need to set it to the parent frame (the window itself).
Thank you all. dear OrbMan i want that users not see refresh of page.if i use one page for each content the page will refreshed for each click on treenode even with ajax.
and dear Cerebrus i would like the url for each content that show on ifram to be different. when i use Navigateurl and target(Iframe) just content of Iframe changed to but url in browser Does not change.