simple question - url target

  • Thread starter Thread starter Shailesh Patel
  • Start date Start date
S

Shailesh Patel

Hi,
In old ASP days where one used to use html frame and clicking link in one
frame calls that url page and displays in another frame.
Same thing, how can I do in aspx pages while using master pages?
I mean, e.g. master page has two contentpalaceholder. On one page I have
link to open some page(htm or aspx) and the target to that link is second
contentplaceholder.

Thank you in advance.

Shailesh Patel.
 
unless you use frames or ajax you can't. the page could use webclient, call
the page and render the html in the content holder.

-- bruce (sqlwork.com)
 
Thank you very much, Bruce.


bruce barker (sqlwork.com) said:
unless you use frames or ajax you can't. the page could use webclient,
call the page and render the html in the content holder.

-- bruce (sqlwork.com)
 
Hi,

You add manage controls inside contentplaceholder:

ASPX:

<asp:LinkButton ID="LinkButton1" runat="server"
OnClick="LinkButton1_Click">LinkButton</asp:LinkButton><br />
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
</asp:contentplaceholder>

CS

protected void LinkButton1_Click(object sender, EventArgs e)
{

ContentPlaceHolder1.Controls.Add(Page.LoadControl("~/UserControls/WebUserControl.ascx"));
}

Please notice that page will be refreshed. To avoid it you can use AJAX
components.

Alexander Kleshchevnikov
www.klalex.com


"""Shailesh Patel ÐÉÓÁÌ(Á):
"""
 
Back
Top