Ajax TabContainer & ModalPopupExtender

Discussion in 'ASP .Net' started by mistryman06@gmail.com, Apr 22, 2008.

  1. Guest

    Hi,
    I'm new to the ASP.NET Ajax. Im struck with an issue.
    Im having a tabcontainer with 3 tabs. Each tab has a user control (all
    3 tab has the same user control) & the user control has a Button &
    ModalPopup Extender. While running the application,
    When I click the TAB1's Button i get a modalpopup in the page. But
    when i select the TAB2 and click on the Button. Im not getting any
    modalpopup in the 2nd tab rather i see the modal popup in the TAB1.
    The modal popup always going to the Tab1. I cant able to bring that
    focus into the tab2 or tab3. Please help me on this.
    Thanks in advance.
    Joe
     
    , Apr 22, 2008
    #1
    1. Advertising

  2. Guest

    Hi Joe,

    I'm not quite sure if I understand your problem. How do you position
    the popup? Could you perhaps post your code? I created a sample. The
    popup always renders on the top of the two tabs:

    Default.aspx:

    <%@ Page Language="C#" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs"
    Inherits="ModalPopupInTabContainer._Default" %>
    <%@ Register Assembly="AjaxControlToolkit"
    Namespace="AjaxControlToolkit" TagPrefix="aj" %>
    <%@ Register Src="~/WebUserControl1.ascx" TagName="TheUserCtrl"
    TagPrefix="my" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
    www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>Untitled Page</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <asp:ScriptManager ID="mgr" runat="server" />
    <aj:TabContainer ID="theTab" HeaderText="The First Tab"
    runat="server">
    <aj:TabPanel ID="pnlOne" HeaderText="First Tab"
    runat="server">
    <ContentTemplate>
    <my:TheUserCtrl ID="userCtrl1" runat="server" /
    >

    </ContentTemplate>
    </aj:TabPanel>
    <aj:TabPanel ID="pnlTwo" HeaderText="Second Tab"
    runat="server">
    <ContentTemplate>
    <my:TheUserCtrl ID="userCtrl2" runat="server" /
    >

    </ContentTemplate>
    </aj:TabPanel>
    </aj:TabContainer>
    </div>
    </form>
    </body>
    </html>

    WebUserControl1.ascx:

    <%@ Control Language="C#" AutoEventWireup="true"
    CodeBehind="WebUserControl1.ascx.cs"
    Inherits="ModalPopupInTabContainer.WebUserControl1" %>
    <%@ Register Assembly="AjaxControlToolkit"
    Namespace="AjaxControlToolkit" TagPrefix="aj" %>
    <asp:Button ID="theButton" Text="Click" runat="server" />
    <aj:ModalPopupExtender ID="thePopup" TargetControlID="theButton"
    PopupControlID="thePopupPanel"
    OkControlID="theOkButton" DropShadow="false" runat="server" X="20"
    y="20" />
    <asp:panel ID="thePopupPanel" runat="server">
    <div id="wrapper" style="width:200px;height:
    200px;background:silver;border:1px solid">
    <asp:Label ID="theLabel" Text="This is a popup" runat="server"/
    ><br />

    <input type="button" ID="theOkButton" Value="OK"
    runat="server" />
    </div>
    </asp:panel>

    =============
    Regards,
    Steve
    www.stkomp.com

    wrote:
    > Hi,
    > I'm new to the ASP.NET Ajax. Im struck with an issue.
    > Im having a tabcontainer with 3 tabs. Each tab has a user control (all
    > 3 tab has the same user control) & the user control has a Button &
    > ModalPopup Extender. While running the application,
    > When I click the TAB1's Button i get a modalpopup in the page. But
    > when i select the TAB2 and click on the Button. Im not getting any
    > modalpopup in the 2nd tab rather i see the modal popup in the TAB1.
    > The modal popup always going to the Tab1. I cant able to bring that
    > focus into the tab2 or tab3. Please help me on this.
    > Thanks in advance.
    > Joe
     
    , Apr 24, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. smnbss

    AJAX TabContainer TabPanel Repeater

    smnbss, Apr 2, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    875
    smnbss
    Apr 2, 2007
  2. =?Utf-8?B?QW5kcmV3?=

    AJAX TabContainer Problem

    =?Utf-8?B?QW5kcmV3?=, Sep 27, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    431
    =?Utf-8?B?QW5kcmV3?=
    Sep 27, 2007
  3. Replies:
    1
    Views:
    491
  4. Paul
    Replies:
    0
    Views:
    374
  5. Mohsin Khan
    Replies:
    2
    Views:
    625
    Mohsin Khan
    Aug 14, 2008
Loading...

Share This Page