I have multiple ASPX pages already created. I need to "insert" the entire page (NOT a link to the page) inside a Tab panel. Can I do this in some way
without having to insert all the HTML/ASPX code for the page that has already been created? In other words I have...
This is not how I want to do this - I don't want the user to have to click a link to view the ASPX page that I want to open within that tab panel.
Does any one have any suggestions on how I can include an ASPX page inside a tab panel without creating a link that the user must click on to view the page? Any help would be greatly appreciated!
The only thing to watch is that if you arre using a Masterpage, that you don't have it in both the page that holds your Tab control AND the .aspx page that you are calling from the Iframe. Pretty cool!
While the above does work if you all you want to do is display an already existing .aspx page, if the .aspx page is a form that captures data, it does not work because the .aspx page witin the Iframe does not get the updated on the postback. Using an update
panel does not work because the .aspx page inside the Iframe does not get refreshed on the postback of the Masterpage and therefore the data on that page does not get captured. If you just want to display data then it works fine, but if you want to capture/update
it this will not work. So instead of using Iframe and inserting our .aspx pages, we are converting the .aspx pages that will be used in multiple places to .ascx pages (User Controls) which can be inserted in the tab panel and WILL get updated on the postback.
I hope this helps someone else who may be having this issue - although creating .ascx pages may not be a solution for everyone, it is something to think about if you are going to have to show that same "page" (control) in multiple different tabs...
Coleen
"We Develop Webs"
Marked as answer by Coleen on Nov 09, 2007 06:02 PM
Coleen
Member
643 Points
582 Posts
Can I do this with a Tab Panel?
Nov 06, 2007 07:09 PM|LINK
I have multiple ASPX pages already created. I need to "insert" the entire page (NOT a link to the page) inside a Tab panel. Can I do this in some way without having to insert all the HTML/ASPX code for the page that has already been created? In other words I have...
@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="testIframeTab.aspx.vb" Inherits="Default_testIframeTab" title="Untitled Page" %> Namespace="AjaxControlToolkit" TagPrefix="cc1" %> asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> cc1:TabContainer ID="TabContainer1" runat="server"> <cc1:TabPanel ID="TabPanel1" runat="server"> <ContentTemplate> <a href="../AcctTrans/AddMaintAcct.aspx">../AcctTrans/AddMaintAcct.aspx</a> </ContentTemplate> </cc1:TabPanel> cc1:TabContainer> asp:Content>Does any one have any suggestions on how I can include an ASPX page inside a tab panel without creating a link that the user must click on to view the page? Any help would be greatly appreciated!
Thanks!
"We Develop Webs"
Coleen
Member
643 Points
582 Posts
Re: Can I do this with a Tab Panel?
Nov 06, 2007 08:52 PM|LINK
Well, a co-worker found a way to do this (thanks Gil) so I will post it here;
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="testIframeTab.aspx.vb" Inherits="Default_testIframeTab" title="Untitled Page" %> <%@ Register Assembly="AjaxControlToolkit, Version=1.0.10920.18205, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <cc1:TabContainer ID="TabContainer1" runat="server"> <cc1:TabPanel ID="TabPanel1" runat="server"> <ContentTemplate> <iframe src="../AcctTrans/AddMaintAcct.aspx" width=100%></iframe> </ContentTemplate> </cc1:TabPanel> </cc1:TabContainer> </asp:Content>The only thing to watch is that if you arre using a Masterpage, that you don't have it in both the page that holds your Tab control AND the .aspx page that you are calling from the Iframe. Pretty cool!
"We Develop Webs"
Coleen
Member
643 Points
582 Posts
Re: Can I do this with a Tab Panel?
Nov 09, 2007 06:01 PM|LINK
While the above does work if you all you want to do is display an already existing .aspx page, if the .aspx page is a form that captures data, it does not work because the .aspx page witin the Iframe does not get the updated on the postback. Using an update panel does not work because the .aspx page inside the Iframe does not get refreshed on the postback of the Masterpage and therefore the data on that page does not get captured. If you just want to display data then it works fine, but if you want to capture/update it this will not work. So instead of using Iframe and inserting our .aspx pages, we are converting the .aspx pages that will be used in multiple places to .ascx pages (User Controls) which can be inserted in the tab panel and WILL get updated on the postback.
I hope this helps someone else who may be having this issue - although creating .ascx pages may not be a solution for everyone, it is something to think about if you are going to have to show that same "page" (control) in multiple different tabs...
"We Develop Webs"
sajeer.vj
Member
4 Points
2 Posts
Re: Can I do this with a Tab Panel?
Apr 30, 2009 08:11 AM|LINK
nice itworks fine