Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I'm Using AJAXControlToolKit Tab Controller to create Tab.

In that in Using iframe to add different page.

I Added the tab in the page (TabPage.aspx) and called all the page (ChildPage1.aspx, ChildPage2.aspx,ChildPage3.aspx,ChildPage4.aspx) from that page

I want to add save and proceed Button in the TabPage.aspx when the user click the button then it should save the data in the selected tab and proceed to the next tab i.e. if the user is at ChildPage1.aspx then the values should be saved in the ChildPage1.aspx and he should procced to the page ChildPage2.aspx

TabPage.aspx

C#
<form id="form1"  runat="server">
    <div>
        <Ajx:ToolkitScriptManager  runat="server" EnablePartialRendering="true" ID="ScriptManager1" />
        <Ajx:TabContainer  runat="server" ID="Tabs" Visible="true" CssClass="Tab" BorderStyle="None" TabIndex="0">
            <Ajx:TabPanel  runat="server" ID="TabPanel1" HeaderText="Page1">
                <ContentTemplate>
                    <iframe id="Iframe1" src="ChildPage1.aspx"  runat="server"
                        width="100%" height="650px"></iframe>
                </ContentTemplate>
            </Ajx:TabPanel>
            <Ajx:TabPanel  runat="server" ID="TabPanel2" HeaderText="Page2">
                <ContentTemplate>
                    <iframe id="Iframe2" src="ChildPage2.aspx"  runat="server"
                        width="100%" height="650px"></iframe>
                </ContentTemplate>
            </Ajx:TabPanel>
        </Ajx:TabContainer>
        <Ajx:TabPanel  runat="server" ID="TabPanel3" HeaderText="Page3">
                <ContentTemplate>
                    <iframe id="Iframe3" src="ChildPage3.aspx"  runat="server"
                        width="100%" height="650px"></iframe>
                </ContentTemplate>
            </Ajx:TabPanel>
        </Ajx:TabContainer>
        <br />
        <asp:Button runat="server" ID="btnMasterPage" Text="Button in Page Tab" 
            onclick="btnMasterPage_Click" />
    </div>
    </form>


ChildPage1.aspx

C#
<form id="form1"  runat="server">
    <div>
        Page 1
        <br />
        <br />
        <asp:Label ID="lblText" runat="server" Text="Name"></asp:Label>
        <br />
        <br />
        <asp:TextBox ID="txtText" runat="server"></asp:TextBox>
    </div>
    </form>
Posted
Updated 20-Mar-14 10:02am
v2
Comments
ZurdoDev 20-Mar-14 14:29pm    
Where are you stuck? This is a list of requirements instead of showing us your code and telling us where you are stuck. It will be hard to help if we can't see what you have.
write2varun 20-Mar-14 15:50pm    
i need to call the save function which is in page ChildPage1.aspx from TabPage.aspx
ZurdoDev 20-Mar-14 16:06pm    
You'll want to create a javascript function in each and google how to call javascript function from child to parent. Then your JS will have to call the method you want.
write2varun 21-Mar-14 14:03pm    
can you post this as a solution i have to mark this as solution
ZurdoDev 21-Mar-14 14:08pm    
Good, glad to hear you got it working.

1 solution

From the comments, You'll want to create a javascript function in each page and google how to call javascript function from child to parent. Then your JS will have to call the method you want.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900