Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

Ajax TabContainer & ModalPopupExtender

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mistryman06@gmail.com - 22 Apr 2008 15:44 GMT
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
wisccal@googlemail.com - 24 Apr 2008 06:38 GMT
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

mistryma...@gmail.com wrote:
> Hi,
> I'm new to the ASP.NET Ajax. Im struck with an issue.
[quoted text clipped - 8 lines]
> Thanks in advance.
> Joe

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.