Results 1 to 5 of 5

Thread: controls in asp.net

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    controls in asp.net

    Hi, are there any controls in asp.net that:

    There are two frames/panels on one page. If the user clicks on the link on the first left frame/panel, it will show a website (not my site) on the right hand side? It doesn't have to be frame/panel, but I just want something that can do this.

  2. #2
    Fanatic Member
    Join Date
    Jun 2004
    Location
    All useless places
    Posts
    917

    Re: controls in asp.net

    Will this link help?

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: controls in asp.net

    No

  4. #4
    Fanatic Member
    Join Date
    Jun 2004
    Location
    All useless places
    Posts
    917

    Re: controls in asp.net

    And why not? From the problem statement I understand that you want to open another website within your page on click of a link button (or any other control). My HTML
    Code:
    <form id="form1" runat="server">
            <div>
                <asp:Panel ID="Panel1" runat="server">
                    <asp:LinkButton ID="LinkButton1" runat="server" >LinkButton</asp:LinkButton>
                </asp:Panel>
            </div>
            <iframe id="testFrame" runat="server" src="" width="50%"></iframe>
                </form>
    And in code behind
    Code:
    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
            testFrame.Attributes.Add("src", "http://www.google.com")
        End Sub
    Click the link button and it opens the web page in the frame (in the same page).

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: controls in asp.net

    You can also use the object tag in a similar fashion to what rjv has shown you for a standards compliant way

    Code:
    <object id="ExternalPage" runat="server" height="blah" width="blah">
    Sorry, your browser does not support frames, please upgrade to a modern browser.
    </object>

    Code:
    ExternalPage.Attributes.Add("data","http://www.mendhak.com/");

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width