AJAX :: Ajaxtoolkit PopupControlExtender - Popup Modal Disappear By Itself
Sep 27, 2010
i put PopUpcontrolExtender in my page to learn more about this toolkit base on the Ajax tutorial but ,when i click on the button, popup modal form popped up and disapear by itself fast, here is my code:
<%
<%
@
Page
Language="VB"
AutoEventWireup="true"
CodeFile="Default.aspx.vb"
Inherits="_Default" %>@
Register
Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit"
TagPrefix="ajaxToolkit" %>
<!
<
<
DOCTYPE
html
PUBLIC
"-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">html
xmlns="http://www.w3.org/1999/xhtml">head
runat="server">
</
<
<title>Untitled
Page</title>head>body>
<form
id="form1"
runat="server">
<asp:ScriptManager
ID="ScriptManager1"
runat="server"
/>
<asp:TextBox
ID="TextBox1"
runat="server"></asp:TextBox><br
/>
<div>
<ajaxToolkit:CalendarExtender
ID="CalendarExtender1"
runat="server"
TargetControlID="TextBox1">
</ajaxToolkit:CalendarExtender>
<br
/>
<asp:TextBox
ID="TextBox2"
runat="server"
TextMode="Password"></asp:TextBox>
<ajaxToolkit:PasswordStrength
ID="PasswordStrength1"
runat="server"
TargetControlID="TextBox2">
</ajaxToolkit:PasswordStrength>
<br
/>
<br
/>
<br
/>
<asp:Button
ID="btnok"
runat="server"
Text="Pop Up Test"
Width="96px"
/>
<br
/>
<asp:Panel
ID="Panel1"
runat="server"
BackColor="#FFFFC0"
Width="184px">
<asp:Label
ID="Label1"
runat="server"
Text="This is Test"
Width="264px"
CssClass="ModalPopup"></asp:Label><br
/>
<asp:Button
ID="btnPopupOk"
runat="server"
Text="Ok"
/></asp:Panel>
<ajaxToolkit:PopupControlExtender
ID="PopupControlExtender1"
PopupControlID="panel1"
OffsetX="500"
OffsetY="100"
runat="server"
TargetControlID="btnok"
>
</ajaxToolkit:PopupControlExtender>
<br
/>
<ajaxToolkit:DropShadowExtender
ID="DropShadowExtender1"
runat="server"
Opacity="75"
TargetControlID="Panel1">
</ajaxToolkit:DropShadowExtender>
</div>
</
</
</form>body>html>
and also i can not put DropShadow="true" in my PopupControlExtender because i will get this Error: "AjaxControlToolkit.PopupControlExtender' does not have a public property named 'DropShadow'"
View 9 Replies
Similar Messages:
Jan 24, 2013
I look for a good way for arrangement Admin pages Items
for example Admin Upload Page consists of these sections:
* make a new folder
* delete folder
* upload file in folder
* show folders information (in a gridview)
* download test
so I think one way is showing this sections in modal
but when I tried make a new folder in modal after clicking in create folder button modal disappeared.
Is there any way that modal doesnt disappear until user click close button?
I mean I want modal to behave like a page.
If there isn't a way what to do for classification sections?
View 1 Replies
Apr 7, 2010
I have masterpage which includes dropdown list for choosing skins for page.
Also I have Home.aspx include above master page. This Home.aspx contains update panel[up1] which further comprises of gridview, link button, image button[IB] and dropdown list. Also there is one modal popup that has a panel which includes dropdown and text box.
Requirement: when i click image button[IB], modal popup opens up and home.aspx gets grayed up.
Issue: when i click image button[IB], modal popup opens up, but all dropdowns placed in[Home.aspx and Master page] get disappeared[invisible]. Once i close modal popup , they are visible.
View 4 Replies
Jan 17, 2010
I am trying to get a modal popup inside a modal popup?, also i want to fire the modal popup on a condition in a text change event of a textbox?...is this possible and can anyone give me directon on this
View 5 Replies
Apr 8, 2010
On a fairly complex page, we're getting some unusual behavior with dropdownlists in IE6. To layout the basic structure, there are 2 update panels on the page each with a gridview presenting a master-details layout. In addition to the grid, each panel houses some dropdownlists for filtering the data in the respective gridview.
Now what's happening is that a button on the bottom grid will cause a modal popup form to display, where some details about the row item can be modified. As per the ASP.NET AJAX javascript, the dropdowns disable during the postback, and re-enable after it closes. The bottom grid also has a timer attached to it that periodically updates it to keep the view of the data fresh. When this timer ticks after the modal popup is closed, the drop down lists mysteriously vanish, except for the ones in that update panel which apparently get rendered again.
Oddly enough, if the timer ticks while the popup is up, the drop downs enable early and show through the modal (oh IE6...) but don't vanish later on.
View 1 Replies
Aug 11, 2010
Modal PopUp Extender Catch exception error and display on modal popup
[Code]....
View 2 Replies
Apr 9, 2010
I have an Ajax ModalPopupExtender on a page. To summarise. I have a link on a page, when I click the link the modal popup displays. On this modalpopup I've a textbox and an 'ok' and 'cancel' button. I wish to find out what was entered in the textbox when the button is clicked I try this but the value of ((TextBox)button1.Page.FindControl("theTitle")) is null.
if (((TextBox)button1.Page.FindControl("theTitle")).Text == "")
void okButton_Click(object sender, EventArgs e)
{
try
{
//if i try this tt does not compile//The name 'theTitle' does not exist in the current context//if(theTitle.Text == "")//{//}
Button button1 = (Button)sender;
//TextBox theTitle = ((ImageButton)(e.Item.FindControl("theTitle")));
if (((TextBox)button1.Page.FindControl("theTitle")).Text == "")
{
}
else
{
}
}
catch (Exception)
{
}
}
View 3 Replies
Oct 19, 2010
I am displaying links in gridview. When user clicks on link....big image is displayed. Everything is working fine.
As of now i am redirecting user to LargeImage.aspx..where i am able to display the largeimage.
But I need to display the large image within a popup in the same page where gridview is present.
User must be able to close that popup and return to the page(containing gridview).
I would like to do it with a popupcontrolextender.
View 2 Replies
May 7, 2015
I have three modal popup and three link buttons the first link button is on menu i.e. login that shows login-popup and the login popup contains two links forgot password and register both of them opens a popup but the problem is the login popup isnt hiding with click on register or foreget link the popups are appearing perfectly but arent hiding.
The html for all three popup is as shown below:-
<cc1:ModalPopupExtender ID="Modallogin" runat="server" PopupControlID="loginpanel" TargetControlID="loginlink" BackgroundCssClass="modalBackground"
CancelControlID="lnkforgot">
</cc1:ModalPopupExtender>
<asp:Panel ID="loginpanel" runat="server" CssClass="modalPopup">
[Code] .....
And the codebehind file that i wrote some code which also isnt working is as shown below:-
protected void Button2_Click(object sender, EventArgs e) {
Modalforget.Hide();
} protected void lnkregister_Click(object sender, EventArgs e) {
Modallogin.Hide();
Modalregister.Show();
[Code] ....
I also used breakpoints on link click event and are not going to code behind file on click and popup is just shown without hiding the other. And the css used is I found on aspsnippet site!
View 1 Replies
Feb 25, 2010
I use ajaxToolkit:ModalPopupExtender to show a modal window panel. The panel among other things contains a "Submit" button. I would like to call a code behind function on Submit. First I tried this:
[Code]....
But btnSubmitOnHold_Click() is never called. Then I replaced OnClick="btnSubmitOnHold_Click" with OnClientClick="SubmitPutOnHold" and added
<script type="text/javascript">
function SubmitPutOnHold()
{
alert('blah');
}
</script>
This alert also never shows up. Finally, I tried
<ajaxToolkit:ModalPopupExtender ID="OnHoldModalPopupExtender" runat="server" TargetControlID="btnPutOnHold" PopupControlID="pnlOnHold" BackgroundCssClass="modalBackground" DropShadow="true" OkControlID="btnSubmitOnHold" CancelControlID="btnCancelOnHold"
OnOkScript="SubmitPutOnHold" >
</ajaxToolkit:ModalPopupExtender>
View 2 Replies
Jul 29, 2010
Modal Popup user control (its a message box) on top of a modal popup with javascript that maintains postback on a scrollable div all inside of an update panel causes my page to flash on postback of the user control. If any one of the peices (user control, modal popup, javascript) are missing everything works fine. The javascript is maintaing scrollback on a scrollable listview on the page. A modalpopup is shown on top of this main page that is for report parameters. The user control is used for validation and is displayed if a parameter is invalid. I know this may not be the best design, but it can't really change unless its a minor change. Heres the js if anyone wants to see popup or styles let me know.
//Begin methods to maintain or reset scroll position during postback.
var controlIds = [];
var scrollTops = [];
//Register a control to maintain its scroll position on postbacks.
function MaintainPostback(controlId) {
controlIds.push(controlId);
}
//Find the div/control id in the controlIds array and set its scroll position to 0.
function ResetControlScrollTop(controlId) {
var index = 0;
while (index < controlIds.length) {
if (controlId == controlIds[index]) {
scrollTops[index] = 0;
return;
}
index++;
}
}............
View 6 Replies
Jul 27, 2010
I'm using modal popup extender and panel with calendar in it. Click the "Next / Previous Month" closes the modal popup. How do I tell the modal popup to ignore click events in a calendar control inside the panel targeted for popup? I'm confused because when using extender before, you had to click OkButton or Cancel to close popup. I have update panel for reason. I just minimized the code for easy review.
[Code]....
View 5 Replies
Sep 2, 2010
I have one page with a panel that makes up my ModalPopup. On the ModalPopup there is an updatepanel with a textbox and a button in it. There is a textbox on the "parent" page and I want to click the button on the modalpopup and move the data from the popup textbox to the parent textbox. So far, no joy. I have a line in the code behind to move the data between textboxes and I have also tried javascript to do the same thing but I am not able to make this happen unless i click the button twice.
View 5 Replies
Feb 20, 2011
I have a textbox1 and button1 and panel1 (which is used as a popup control)
i want if textbox1.text="show" then modalpopup control whose id is panel1 will be visible on buttonclick event other wise .... modal popup control panel1 will not be shown ...
how to do this ? using vb.net ?
View 2 Replies
Aug 19, 2010
How can I get one modal popup to trigger a second modal? And in between each modal, I need to execute server code.
Page load, check if question needs answering -> Modal 1 -> User answers -> run server code to check if question two needs answering -> Modal 2 -> show page.
I could do this using a series of asp:Views if there is not a clean way, the management just really likes the modals
View 2 Replies
Dec 7, 2010
In my application I have a formview which is inside of a Ajax modal popup.Once users enter the information in the formview and click save, I validation the input.errors, I want to display an error message as a popup or as a modal popup (not javascript alert) with in the ajax modal.How do I do that. I tried several ways but it closes the ajax modal popup.
View 2 Replies
May 25, 2010
I'm in a Unique position where I have to display one popup above another popup. Problem is that popup B's background does not show above popup A's content and as such you ae still able to click on buttons, ect. on popup A.
I tried to rather disable the Tab Control on popup A with javascript once popup B is displayed, but it only disables textboxes and labels and nothing else.
getting popup B's background to display above popup A or help with disabling all controls (Contained in Tab Control) on popup A?
View 1 Replies
May 4, 2010
When using a modal popup extender along with an embedded video, the popup is hidden behind the video in IE but works as expected in FF.I've tried manually setting the z-index of the popup to a huge number and the z-index of the video object to 1 but this makes no difference.
I've put the code for a sample page below.
[Code]....
View 2 Replies
Oct 29, 2010
When i try to submit the page which has modal popup extender,popup extender becomes visible! How can i avoid this?
View 2 Replies
Sep 13, 2010
I would like to call a popup of the popupcontrolextender programmatically. Is this possible?
View 1 Replies
Jun 15, 2010
Lets say I have a user control AjaxUC.
<asp:ModalPopupExtender ID="modalSearch" runat="server" TargetControlID="btnHiddenSearch"
PopupControlID="pnlModalSearch" DropShadow="false" RepositionMode="RepositionOnWindowResize"
Drag="false" BackgroundCssClass="modalBackground" >
</asp:ModalPopupExtender>
<asp:Button ID="btnHiddenSearch" runat="server" Style="display: none" />
<asp:Panel ID="pnlModalSearch" runat="server" CssClass="modalPopup">
<asp:Panel ID="pnlModalSearchContent" runat="server">
<asp:Label ID="lblSearchTitle" runat="server" CssClass="modalPopupTitle"></asp:Label>
<div id="divContent" runat="server">
</div>
<asp:Button ID="btnModalSearchClose" runat="server" Text="Close" CausesValidation="false"
OnClick="BtnModalSearchCloseClick" />
</asp:Panel>
</asp:Panel>
<input type="hidden" id="hdVisible" runat="server" />
------------------------------------------------------------------------ AjaxUC.ascx.cs:-
public partial class AjaxUC : System.Web.UI.UserControl { private ITemplate _content = null; [TemplateInstance(TemplateInstance.Single)] [TemplateContainer(typeof(Container))] [PersistenceMode(PersistenceMode.InnerProperty)] public ITemplate Content { get
{ return _content; } set
{ _content = value; } } void Page_Init() { if (_content != null) { Container container = new Container(); _content.InstantiateIn(container); divContent.Controls.Add(container); lblSearchTitle.Text = LblModalSearchText; } } protected void Page_Load(object sender, EventArgs e) { if (hdVisible.Value=="true") { modalSearch.Show(); } } } public class Container : Control, INamingContainer { internal Container() { } }}
This control when used on any aspx page will popup the control placed inside the template "divContent" as modalpopup.
________________________________________________________________________
Now I am trying to convert this user control to Custom Control and my code is:-
[ParseChildren(true)] [PersistChildren(true)] public class DNAWebAjaxTool : PlaceHolder { public event EventHandler BtnModalSearchCloseClickEvent; public event EventHandler Click; private ITemplate _content = null; private HtmlInputHidden _hdVisible; private Panel _pnlModalSearchContent; private Panel _pnlModalSearch; private ModalPopupExtender _modalSearch; private Button _btn; private DivContainer divContent = new DivContainer(); private string _viewState; public DNAWebAjaxTool() { } public Panel PnlModalSearchContent { get
{ if (_pnlModalSearchContent == null) { _pnlModalSearchContent = new Panel(); } return _pnlModalSearchContent; } } public ModalPopupExtender ModalSearch { get
{ if (_modalSearch == null) { _modalSearch = new ModalPopupExtender(); } return _modalSearch; } } public string ViewState { get
{ return _viewState; } set
{ _viewState = value; } } public HtmlInputHidden HdVisible { get
{ if (_hdVisible == null) { _hdVisible = new HtmlInputHidden(); } return _hdVisible; } } [TemplateInstance(TemplateInstance.Single)] [TemplateContainer(typeof(DivContainer))] [PersistenceMode(PersistenceMode.InnerProperty)] public ITemplate Content { get
{ return _content; } set
{ _content = value; } } protected override void OnInit(EventArgs e) { _content.InstantiateIn(divContent); base.Controls.Add(divContent); base.OnInit(e); } protected override void OnLoad(EventArgs e) { if (HdVisible.Value == "true") { ModalSearch.Show(); } base.OnLoad(e); } void _btn_Click(object sender, EventArgs e) { BtnModalSearchCloseClickEvent(sender, e); } public virtual void Hide() { PnlModalSearchContent.Visible = false; ModalSearch.Hide(); ViewState = "false"; } public virtual void Show() { PnlModalSearchContent.Visible = true; ModalSearch.Show(); ViewState = "true"; } protected override void CreateChildControls() { base.CreateChildControls(); } protected override void Render(HtmlTextWriter writer) { if (ViewState == "true") { _modalSearch = new ModalPopupExtender(); _modalSearch.ID = "modalSearch"; _modalSearch.TargetControlID = "btnHiddenSearch"; _modalSearch.PopupControlID = "pnlModalSearch"; _modalSearch.DropShadow = false; _modalSearch.RepositionMode = AjaxControlToolkit.ModalPopupRepositionMode.RepositionOnWindowResize; _modalSearch.Drag = false; _modalSearch.BackgroundCssClass = "modalBackground"; _modalSearch.Show(); _btn = new Button(); _btn.ID = "btnHiddenSearch"; _btn.Style.Value = "display: none"; _btn.RenderControl(writer); _pnlModalSearch = new Panel(); _pnlModalSearch.ID = "pnlModalSearch"; _pnlModalSearch.CssClass = "modalPopup"; _pnlModalSearch.RenderControl(writer); PnlModalSearchContent.ID = "pnlModalSearchContent"; PnlModalSearchContent.RenderControl(writer); divContent.RenderControl(writer); _btn = new Button(); _btn.ID = "btnModalSearchClose"; _btn.Text = "Close"; _btn.CausesValidation = false; _btn.Click += new EventHandler(_btn_Click); _btn.RenderControl(writer); } } } public class DivContainer : Control, INamingContainer { internal DivContainer() { } }
________________________________________________________________________________________________
The problem I am facing is that the modalpopup extennder is not coming up as a popup.
View 2 Replies
Mar 8, 2010
I have scriptmanager on master page and on content page I have update panel inside tabcontainer.
In update panel I have gridview. I have added modal popup to Delete linkbutton. When Item is deleted I give confirmation that item is deleted. When this alert pops up, again modal popup pops up. I have 4 tab panels in tab container and 3 of it have update panel with gridview. This is happening on each tab panel.
Earlier I was using scriptmanager on content page. Then I realised that I'm adding scriptmanager to every content page, so I placed it in master page.
View 6 Replies
Feb 4, 2010
how can i use the panel which use as modal popup in another page.
i mean second page is an template page which use from several page and i want the modal popup in that page.
i want show modal popup without show the page.
can i do this in some way?
View 4 Replies
Feb 3, 2010
using Previeww 6 of Ajax....
I'm attempting to put a modal popup in each row of a dataview as shown:
[code].....
but the popupcontrolid cannot be found. I have checked the Dom and it has been created but $get cannot find it.
View 2 Replies
Feb 1, 2011
How can I close a Ajax Modal Pop-up through VB.net? All i want to do is just click the cancel button in the code behind, or if you can think of something better?
View 3 Replies