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.

Welcome noorashegh,

HtmlGenericControl hc = new HtmlGenericControl("iframe");
 hc.Attributes.Add("src", "Default.aspx");
 form1.Controls.Add(hc);

You should have to read,
1.Homework policy
2.How to post source code?
Do not forget to use code tags. Source code must be surrounded with code tags.
For example,

[code=asp.net] ... statements..

[/code]

Thank you all.
dear Ramesh S
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.

That is the point of an iframe. You can generate a Guid() and use it as a parameter to a page that shows the iframe'd content and switch the iframe dest based on that -- but how would this benefit you?

Hi, please adjust with your purpose.
I hope I can help you.
:)

Protected Sub CmdTD_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CmdTD.Click
        IFrameTDInfo.Attributes("Src") = "IFrameMasterCustomer\MasterCustomerTDInfo.aspx?CustomerID=" & TxtCustomerID.Text.Trim 
    End Sub


   <iframe runat="server" id="IFrameTDInfo" height="100%" width="100%" style="width: 100%"></iframe>

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.