Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Ajax TabContainer & ModalPopupExtender

Reply
Thread Tools

Ajax TabContainer & ModalPopupExtender

 
 
mistryman06@gmail.com
Guest
Posts: n/a
 
      04-22-2008
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
 
Reply With Quote
 
 
 
 
wisccal@googlemail.com
Guest
Posts: n/a
 
      04-24-2008
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" />
<aspanel 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>
</aspanel>

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

mistryma...@gmail.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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ajax TabContainer behaviour like Windows TabControl? Mohsin Khan ASP .Net 2 08-14-2008 07:38 AM
navigation question using TabContainer-ajax control Paul ASP .Net 0 04-03-2008 11:59 PM
Little problem with TabContainer (ajax) laziers@gmail.com ASP .Net 1 01-19-2008 06:40 AM
AJAX TabContainer Problem =?Utf-8?B?QW5kcmV3?= ASP .Net 0 09-27-2007 09:04 AM
AJAX TabContainer TabPanel Repeater smnbss ASP .Net 0 04-02-2007 11:24 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57