Search Results

Search found 41 results on 2 pages for 'modalpopup'.

Page 1/2 | 1 2  | Next Page >

  • ModalPopup CodeBehind Function Wait For User Response

    - by Snave
    I have set up a function which returns an enum of the button that the user clicked in the ModalPopup. I have a variable of type enum to store which button the user clicks in the button click event. In this function, I call the ModalPopupExtender's Show() method. My problem is, the function finishes out and returns the default enum (which is "none" since no button was clicked yet) before the ModalPopup can be shown and store which button the user clicks. So without changing the function to a method and using a different way to store the user's button click, how can I pause the function after the Show() method of the MPE has been called and wait for the user to click a button? Edit(11/20/2009): Clarification: On the aspx page, I include a ScriptManager, PlaceHolder, and an asp:Button with a codebehind click event. What I want is to click the button, then in the click event handler, I want to call a custom static class function that returns a variable. One of the arguments it takes is the PlaceHolder. The function creates all the necessary controls in the PlaceHolder needed to display a ModalPopup. It calls the created ModalPopupExtender's Show() method. What should happen: At this point is the ModalPopup gets displayed, the user clicks a button, that button's event handler fires, the button sets a variable indicating that it was clicked, it then calls the ModalPopupExtender's .Hide() method, and then the function returns the variable that indicates which button was clicked. We then return to the event handler from the original button that was clicked and the programmer can then perform some logic based on what variable was returned. Crux: When the ModalPopupExtender's .Show() method gets called, it does not display the ModalPopup until AFTER the function returns a default variable (because no button was clicked yet) and after the event handler from the original button that was clicked ends. What I need: After the ModalPopupExtender's .Show() method is called, I need the ModalPopup to get displayed immediately and I need the function to wait for a button click to be made from the ModalPopup. My thoughts: Some PostBack needs to be made to the page telling it to update and display the ModalPopup Panel. Then maybe a while loop can be run in the function that waits for a button to be clicked in the ModalPopup.

    Read the article

  • AjaxToolKit - ModalPopup conflicts with the current stable version

    - by Guilherme Cardoso
    For those who are using the current stable version of AjaxToolKit (40 412) will face an annoying problem. The ModalPopup cannot be used together with an UpdatePanel and one textbox. This is because during the postback, the value of the textbox will be changed and added a comma. That is, if we use a ModalPopup to have a form and then we add a database, the value "Antonio" in the text box will be entered as "Antonio." I've been researching a bit and this bug is even launching this version. To counter this I'm using the stable 30 512 May 2009 - http://ajaxcontroltoolkit.codeplex.com/releases/view/27326 One detail I noticed was that the ModalPopup OkControlID on the property. If we define the event does not occur (example: If this button is add the data to the database, the panel controlled by ModalPopup disappears but not to add the event occurs). Therefore it is best not declare anything on this property, it works without problems the same.

    Read the article

  • button inside modalpopup doesn't fire the event

    - by Turi
    hi, i've a simple search form with with two textfield and on button. the result is displayed in gridview. All this is inside a modalpopup. the content of the modalpopup (the controls) are in the same page (parent page). i am not using iframe and updatepanel. the problem i've now is: when i click on the search button, the event doesn't fire. can some help me, or give me an appropriate advice. thnx in advance.

    Read the article

  • AJAX ModalPopup Pops Behind (Under) Page Content (Negative z-index)

    - by Aaron Hoffman
    I am having an issue with the AJAX ModalPopupExtender in version 40412 of the AJAX Control Toolkit (http://ajaxcontroltoolkit.codeplex.com/releases/view/43475). The first time the ModalPopup is made visible it works correctly. The z-index is set to 6001 (and the background Div's z-index is set to 6000) and the Popup appears above everything else. If the cancel button within the ModalPopup is clicked, it also has the correct functionality, the display is set to "none" and the ModalPopup is no longer visible. However, when the Popup is triggered again, the z-index is only set to 2000 which is still visible above everything else, but if it is canceled and triggered again it is set to -2000 which is not visible (the z-index is decreasing by 4000 each time). I'm not sure why this is happening. Any ideas how to fix it? Special circumstances: There are multiple ModalPopup's on the page. All ModalPopups are triggered in code-behind through partial-page postbacks (using the .Show() method) ModalPopupExtenders are within the same UpdatePanels that are displayed as popups

    Read the article

  • Issue with Multiple ModalPopups, ValidationSummary and UpdatePanels

    - by Aaron Hoffman
    I am having an issue when a page contains multiple ModalPopups each containing a ValidationSummary Control. Here is the functionality I need: A user clicks a button and a Modal Popup appears with dynamic content based on the button that was clicked. (This functionality is working. Buttons are wrapped in UpdatePanels and the partial page postback calls .Show() on the ModalPopup) "Save" button in ModalPopup causes client side validation, then causes a full page postback so the entire ModalPopup disappears. (ModalPopup could disappear another way - the ModalPopup just needs to disappear after a successful save operation) If errors occur in the codebehind during Save operation, messages are added to the ValidationSummary (contained within the ModalPopup) and the ModalPopup is displayed again. When the ValidationSummary's are added to the PopupPanel's, the ModalPopups no longer display correctly after a full page postback caused by the "Save" button within the second PopupPanel. (the first panel continues to function correctly) Both PopupPanels are displayed, and neither is "Popped-Up", they are displayed in-line. Any ideas on how to solve this? Image of Error State (after "PostBack Popup2" button has been clicked) ASPX markup <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <%--********************************************************************* Popup1 *********************************************************************--%> <asp:UpdatePanel ID="Popup1ShowButtonUpdatePanel" runat="server"> <ContentTemplate> <%--This button will cause a partial page postback and pass a parameter to the Popup1ModalPopup in code behind and call its .Show() method to make it visible--%> <asp:Button ID="Popup1ShowButton" runat="server" Text="Show Popup1" OnClick="Popup1ShowButton_Click" CommandArgument="1" /> </ContentTemplate> </asp:UpdatePanel> <%--Hidden Control is used as ModalPopup's TargetControlID .Usually this is the ID of control that causes the Popup, but we want to control the modal popup from code behind --%> <asp:HiddenField ID="Popup1ModalPopupTargetControl" runat="server" /> <ajax:ModalPopupExtender ID="Popup1ModalPopup" runat="server" TargetControlID="Popup1ModalPopupTargetControl" PopupControlID="Popup1PopupControl" CancelControlID="Popup1CancelButton"> </ajax:ModalPopupExtender> <asp:Panel ID="Popup1PopupControl" runat="server" CssClass="ModalPopup" Style="width: 600px; background-color: #FFFFFF; border: solid 1px #000000;"> <%--This button causes validation and a full-page post back. Full page postback will causes the ModalPopup to be Hid. If there are errors in code behind, the code behind will add a message to the ValidationSummary, and make the ModalPopup visible again--%> <asp:Button ID="Popup1PostBackButton" runat="server" Text="PostBack Popup1" OnClick="Popup1PostBackButton_Click" />&nbsp; <asp:Button ID="Popup1CancelButton" runat="server" Text="Cancel Popup1" /> <asp:UpdatePanel ID="Popup1UpdatePanel" runat="server"> <ContentTemplate> <%--*************ISSUE HERE*************** The two ValidationSummary's are causing an issue. When the second ModalPopup's PostBack button is clicked, Both ModalPopup's become visible, but neither are "Popped-Up". If ValidationSummary's are removed, both ModalPopups Function Correctly--%> <asp:ValidationSummary ID="Popup1ValidationSummary" runat="server" /> <%--Will display dynamically passed paramter during partial page post-back--%> Popup1 Parameter:<asp:Literal ID="Popup1Parameter" runat="server"></asp:Literal><br /> </ContentTemplate> </asp:UpdatePanel> &nbsp;<br /> &nbsp;<br /> &nbsp;<br /> </asp:Panel> &nbsp;<br /> &nbsp;<br /> &nbsp;<br /> <%--********************************************************************* Popup2 *********************************************************************--%> <asp:UpdatePanel ID="Popup2ShowButtonUpdatePanel" runat="server"> <ContentTemplate> <%--This button will cause a partial page postback and pass a parameter to the Popup2ModalPopup in code behind and call its .Show() method to make it visible--%> <asp:Button ID="Popup2ShowButton" runat="server" Text="Show Popup2" OnClick="Popup2ShowButton_Click" CommandArgument="2" /> </ContentTemplate> </asp:UpdatePanel> <%--Hidden Control is used as ModalPopup's TargetControlID .Usually this is the ID of control that causes the Popup, but we want to control the modal popup from code behind --%> <asp:HiddenField ID="Popup2ModalPopupTargetControl" runat="server" /> <ajax:ModalPopupExtender ID="Popup2ModalPopup" runat="server" TargetControlID="Popup2ModalPopupTargetControl" PopupControlID="Popup2PopupControl" CancelControlID="Popup2CancelButton"> </ajax:ModalPopupExtender> <asp:Panel ID="Popup2PopupControl" runat="server" CssClass="ModalPopup" Style="width: 600px; background-color: #FFFFFF; border: solid 1px #000000;"> <%--This button causes validation and a full-page post back. Full page postback will causes the ModalPopup to be Hid. If there are errors in code behind, the code behind will add a message to the ValidationSummary, and make the ModalPopup visible again--%> <asp:Button ID="Popup2PostBackButton" runat="server" Text="PostBack Popup2" OnClick="Popup2PostBackButton_Click" />&nbsp; <asp:Button ID="Popup2CancelButton" runat="server" Text="Cancel Popup2" /> <asp:UpdatePanel ID="Popup2UpdatePanel" runat="server"> <ContentTemplate> <%--*************ISSUE HERE*************** The two ValidationSummary's are causing an issue. When the second ModalPopup's PostBack button is clicked, Both ModalPopup's become visible, but neither are "Popped-Up". If ValidationSummary's are removed, both ModalPopups Function Correctly--%> <asp:ValidationSummary ID="Popup2ValidationSummary" runat="server" /> <%--Will display dynamically passed paramter during partial page post-back--%> Popup2 Parameter:<asp:Literal ID="Popup2Parameter" runat="server"></asp:Literal><br /> </ContentTemplate> </asp:UpdatePanel> &nbsp;<br /> &nbsp;<br /> &nbsp;<br /> </asp:Panel> Code Behind protected void Popup1ShowButton_Click(object sender, EventArgs e) { Button btn = sender as Button; //Dynamically pass parameter to ModalPopup during partial page postback Popup1Parameter.Text = btn.CommandArgument; Popup1ModalPopup.Show(); } protected void Popup1PostBackButton_Click(object sender, EventArgs e) { //if there is an error, add a message to the validation summary and //show the ModalPopup again //TODO: add message to validation summary //show ModalPopup after page refresh (request/response) Popup1ModalPopup.Show(); } protected void Popup2ShowButton_Click(object sender, EventArgs e) { Button btn = sender as Button; //Dynamically pass parameter to ModalPopup during partial page postback Popup2Parameter.Text = btn.CommandArgument; Popup2ModalPopup.Show(); } protected void Popup2PostBackButton_Click(object sender, EventArgs e) { //***********After This is when the issue appears********************** //if there is an error, add a message to the validation summary and //show the ModalPopup again //TODO: add message to validation summary //show ModalPopup after page refresh (request/response) Popup2ModalPopup.Show(); }

    Read the article

  • Help me re-center a ModalPopup within an iframe when the iframe's parent window scrolls

    - by Cory Larson
    I have a web page with an iframe in it (I don't like it, but that's the way it has to be). It's not a cross-domain iframe so there's nothing to worry about there. I have written a jQuery extension that does the centering of a ModalPopup (which is called from an overridden AjaxControlToolkit.ModalPopupBehavior._layout method) based on the width and height of the iframe's parent, so that it looks centered even though the iframe is not in the center of the page. It's a lot of tricky stuff, especially since the web page I added the iframe to runs in quirks mode. Now, I've also overridden AjaxControlToolkit.ModalPopupBehavior._attachPopup, so that when the parent window resizes or scrolls, the ModalPopup inside of the iframe recenter's itself relative to the new size of the parent window. However, the same code that attaches the popup to the parent window's resize event does NOT work for the parent window's scroll event. See the code below, and the comments: AjaxControlToolkit.ModalPopupBehavior.prototype._attachPopup = function() { /// <summary> /// Attach the event handlers for the popup to the PARENT window /// </summary> if (this._DropShadow && !this._dropShadowBehavior) { this._dropShadowBehavior = $create(AjaxControlToolkit.DropShadowBehavior, {}, null, null, this._popupElement); } if (this._dragHandleElement && !this._dragBehavior) { this._dragBehavior = $create(AjaxControlToolkit.FloatingBehavior, {"handle" : this._dragHandleElement}, null, null, this._foregroundElement); } $addHandler(parent.window, 'resize', this._resizeHandler); // <== This WORKS $addHandler(parent.window, 'scroll', this._scrollHandler); // <== This DOES NOT work this._windowHandlersAttached = true; } Can anybody explain to me why the resize event works while the scroll event doesn't? Any suggestions or alternatives out there to help me out? I am working with jQuery, so if I can use something besides the $addHandler method from MS that'd be fine. Be aware that I also have to override the _detachPopup function to remove the handler, so I need to take that into account. Thanks!

    Read the article

  • modalpopup.js not working properly in windows

    - by jpallavi
    I have applied modalpopup.js to display error & restrict word limit counter to 300words for messages. Although it displays error message but user can still type words more than 300words in windows operating system. It works fine in fedora operating system.Can somebody help solve the issue.

    Read the article

  • textfield value empty when i fill it with javascript

    - by Turi
    i am using modalpopup to enter some value in a textfield. after the value is selected in the modalpopup view, the modalpopup is closed and the value has taken the propriate value. Even if the value is displyed in the textfield, the textfield1.text returns me string empty. when i see the source code (html), i see that even that the textfield is displaying something it hasn't really this value in it, because the appropriate html input field hasn't value yet. thats the code i use to fill this textfield. function CloseRequestModal(s) { document.getElementById('<%=txtRequest.ClientID%>').value = s; var mpu = $find('<%=ModalPopupExtender3.ClientID%>'); mpu.hide(); } Please Help, Thanks in advance.

    Read the article

  • ModalPopup inside the UpdatePanel with default form values

    - by prometeus
    I have a ModalPopupExtender inside an UpdatePanel which opens an input form. The problem is when I click the "Edit" button (which is also inside the UpdatePanel) I want to fill the form with existing values using server side code. But it OnClick method of the button doesn't seem to work. My question is: How can I make the serverside code run first, than show the edit form?

    Read the article

  • UpdatePanel and ModalPopup Extender

    - by rs
    I have my form designed as <asp:Panel runat="server" Id="xyz"> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> 'Gridview with edit/delete - opens detailsview(edit template) with data for editing </ContentTemplate> </asp:UpdatePanel> <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"> <ContentTemplate> 'Hyperlink to open detailsview(insert template) for inserting records </ContentTemplate> </asp:UpdatePanel> </asp:Panel> <asp:Panel runat="server" Id="xyz1"> 'Ajax modal popup extender control </asp:Panel> It works perfectly when i click update, insert alternately, but when i click insert hyperlink (which is outside gridview) and close/cancel popup without any insert and then again click insert it doesn't call insert_onclick event. It works if i click some other button and click this button. What could be causing this issue and how can i solve it?

    Read the article

  • ASP.NET - Call required field validator before AJAX modalpopup, client side

    - by odinel
    I have an ASP.NET/C# application. The user fills out a form with required fields, then clicks a submit button. An AJAX popup message is then displayed, and if they confirm, their information is posted back to the server. The problem is that the AJAX popup is fired BEFORE the req validator. I need to interrupt this and run the req validator, and then if successful show the popup. I know the req validator is working, because if you cancel the popup message, the req text is shown next to the fields. Textbox and AJAX control code is here: <table> <tr> <td>Name</td> <td> <asp:TextBox ID="txtName" runat="server" CssClass="textBox" AutoPostBack="true"></asp:TextBox> <asp:RequiredFieldValidator ID="reqName" runat="server" Text="*" ControlToValidate="txtName" ValidationGroup="trade" ForeColor="White"></asp:RequiredFieldValidator> </td> </tr> <tr> <td>Address</td> <td> <asp:TextBox ID="txtAdd1" runat="server" CssClass="textBox"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Text="*" ControlToValidate="txtAdd1" ValidationGroup="trade" ForeColor="White"></asp:RequiredFieldValidator> </td> </tr> <tr> <td></td> <td> <asp:Button ID="btnSubmitEnquiry" runat="server" CssClass="buttonText" Text="Submit Enquiry" ValidationGroup="trade" /> </td> </tr> </table> <ajax:ModalPopupExtender ID="ModalPopupExtender1" runat="server" okcontrolid="lnkCancel" targetcontrolid="btnSubmitEnquiry" popupcontrolid="pnlConfirm" popupdraghandlecontrolid="PopupHeader" drag="true" ></ajax:ModalPopupExtender> <asp:Button Text="targetbutton" ID="btnConfTgt" runat="server" Style="display: none" /> <asp:Panel ID="pnlConfirm" style="display:none" runat="server"> <div class="PopupContainer"> <div class="PopupBody"> <br /> <div align="center"> <asp:label ID="Label1" runat="server" CssClass="lblConfirmpopup"> Message goes here </asp:label> </div> <br /><br /><br /> <div align="center"> <asp:LinkButton ID="lnkCancel" runat="server" visible="true" Text="Cancel" CommandName="Update" BorderColor="#FFFFFF" BackColor="#000000" BorderWidth="3" BorderStyle="Double" ForeColor="White" Font-Size="13pt" Font-Underline="False"></asp:LinkButton> <asp:LinkButton ID="lnkConfirm" runat="server" visible="true" Text="Submit Enquiry" CommandName="Update" BorderColor="#FFFFFF" BackColor="#000000" BorderWidth="3" BorderStyle="Double" ForeColor="White" Font-Size="13pt" Font-Underline="False" OnClick="btnSubmitEnquiry_Click"></asp:LinkButton> </div> </div> </div> </asp:Panel> I've tried coding the first submit button to call the client-side req validator method, but no joy; it still shows the popup before the req validator. If there's no simple solution, I was thinking of perhaps an 'outside the box' solution, maybe hiding the initial Submit button after the req validation has passed, then showing an additional button with the popup control attached to it. Not sure how I'd be able to achieve this though. Thanks

    Read the article

  • May 2011 Release of the Ajax Control Toolkit

    - by Stephen Walther
    I’m happy to announce that the Superexpert team has published the May 2011 release of the Ajax Control Toolkit at CodePlex. You can download the new release at the following URL: http://ajaxcontroltoolkit.codeplex.com/releases/view/65800 This release focused on improving the ModalPopup and AsyncFileUpload controls. Our team closed a total of 34 bugs related to the ModalPopup and AsyncFileUpload controls. Enhanced ModalPopup Control You can take advantage of the Ajax Control Toolkit ModalPopup control to easily create popup dialogs in your ASP.NET Web Forms applications. When the dialog appears, you cannot interact with any page content which appears behind the modal dialog. For example, the following page contains a standard ASP.NET Button and Panel. When you click the Button, the Panel appears as a popup dialog: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Simple.aspx.vb" Inherits="ACTSamples.Simple" %> <%@ Register TagPrefix="act" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" %> <!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>Simple Modal Popup Sample</title> <style type="text/css"> html { background-color: blue; } #dialog { border: 2px solid black; width: 500px; background-color: White; } #dialogContents { padding: 10px; } .modalBackground { background-color:Gray; filter:alpha(opacity=70); opacity:0.7; } </style> </head> <body> <form id="form1" runat="server"> <div> <act:ToolkitScriptManager ID="tsm" runat="server" /> <asp:Panel ID="dialog" runat="server"> <div id="dialogContents"> Here are the contents of the dialog. <br /> <asp:Button ID="btnOK" Text="OK" runat="server" /> </div> </asp:Panel> <asp:Button ID="btnShow" Text="Open Dialog" runat="server" /> <act:ModalPopupExtender TargetControlID="btnShow" PopupControlID="dialog" OkControlID="btnOK" DropShadow="true" BackgroundCssClass="modalBackground" runat="server" /> </div> </form> </body> </html>     Notice that the page includes two controls from the Ajax Control Toolkit: the ToolkitScriptManager and the ModalPopupExtender control. Any page which uses any of the controls from the Ajax Control Toolkit must include a ToolkitScriptManager. The ModalPopupExtender is used to create the popup. The following properties are set: · TargetControlID – This is the ID of the Button or LinkButton control which causes the modal popup to be displayed. · PopupControlID – This is the ID of the Panel control which contains the content displayed in the modal popup. · OKControlID – This is the ID of a Button or LinkButton which causes the modal popup to close. · DropShadow – Displays a drop shadow behind the modal popup. · BackgroundCSSClass – The name of a Cascading Style Sheet class which is used to gray out the background of the page when the modal popup is displayed. The ModalPopup is completely cross-browser compatible. For example, the following screenshots show the same page displayed in Firefox 4, Internet Explorer 9, and Chrome 11: The ModalPopup control has lots of nice properties. For example, you can make the ModalPopup draggable. You also can programmatically hide and show a modal popup from either server-side or client-side code. To learn more about the properties of the ModalPopup control, see the following website: http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/ModalPopup/ModalPopup.aspx Animated ModalPopup Control In the May 2011 release of the Ajax Control Toolkit, we enhanced the Modal Popup control so that it supports animations. We made this modification in response to a feature request posted at CodePlex which got 65 votes (plenty of people wanted this feature): http://ajaxcontroltoolkit.codeplex.com/workitem/6944 I want to thank Dani Kenan for posting a patch to this issue which we used as the basis for adding animation support for the modal popup. Thanks Dani! The enhanced ModalPopup in the May 2011 release of the Ajax Control Toolkit supports the following animations: OnShowing – Called before the modal popup is shown. OnShown – Called after the modal popup is shown. OnHiding – Called before the modal popup is hidden. OnHidden – Called after the modal popup is hidden. You can use these animations, for example, to fade-in a modal popup when it is displayed and fade-out the popup when it is hidden. Here’s the code: <act:ModalPopupExtender ID="ModalPopupExtender1" TargetControlID="btnShow" PopupControlID="dialog" OkControlID="btnOK" DropShadow="true" BackgroundCssClass="modalBackground" runat="server"> <Animations> <OnShown> <Fadein /> </OnShown> <OnHiding> <Fadeout /> </OnHiding> </Animations> </act:ModalPopupExtender>     So that you can experience the full joy of this animated modal popup, I recorded the following video: Of course, you can use any of the animations supported by the Ajax Control Toolkit with the modal popup. The animation reference is located here: http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/Walkthrough/AnimationReference.aspx Fixes to the AsyncFileUpload In the May 2011 release, we also focused our energies on performing bug fixes for the AsyncFileUpload control. We fixed several major issues with the AsyncFileUpload including: It did not work in master pages It did not work when ClientIDMode=”Static” It did not work with Firefox 4 It did not work when multiple AsyncFileUploads were included in the same page It generated markup which was not HTML5 compatible The AsyncFileUpload control is a super useful control. It enables you to upload files in a form without performing a postback. Here’s some sample code which demonstrates how you can use the AsyncFileUpload: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Simple.aspx.vb" Inherits="ACTSamples.Simple1" %> <%@ Register TagPrefix="act" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" %> <!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 id="Head1" runat="server"> <title>Simple AsyncFileUpload</title> </head> <body> <form id="form1" runat="server"> <div> <act:ToolkitScriptManager ID="tsm" runat="server" /> User Name: <br /> <asp:TextBox ID="txtUserName" runat="server" /> <asp:RequiredFieldValidator EnableClientScript="false" ErrorMessage="Required" ControlToValidate="txtUserName" runat="server" /> <br /><br /> Avatar: <act:AsyncFileUpload ID="async1" ThrobberID="throbber" UploadingBackColor="yellow" ErrorBackColor="red" CompleteBackColor="green" UploaderStyle="Modern" PersistFile="true" runat="server" /> <asp:Image ID="throbber" ImageUrl="uploading.gif" style="display:none" runat="server" /> <br /><br /> <asp:Button ID="btnSubmit" Text="Submit" runat="server" /> </div> </form> </body> </html> And here’s the code-behind for the page above: Public Class Simple1 Inherits System.Web.UI.Page Private Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click If Page.IsValid Then ' Get Form Fields Dim userName As String Dim file As Byte() userName = txtUserName.Text If async1.HasFile Then file = async1.FileBytes End If ' Save userName, file to database ' Redirect to success page Response.Redirect("SimpleDone.aspx") End If End Sub End Class   The form above contains an AsyncFileUpload which has values for the following properties: ThrobberID – The ID of an element in the page to display while a file is being uploaded. UploadingBackColor – The color to display in the upload field while a file is being uploaded. ErrorBackColor – The color to display in the upload field when there is an error uploading a file. CompleteBackColor – The color to display in the upload field when the upload is complete. UploaderStyle – The user interface style: Traditional or Modern. PersistFile – When true, the uploaded file is persisted in Session state. The last property PersistFile, causes the uploaded file to be stored in Session state. That way, if completing a form requires multiple postbacks, then the user needs to upload the file only once. For example, if there is a server validation error, then the user is not required to re-upload the file after fixing the validation issue. In the sample code above, this condition is simulated by disabling client-side validation for the RequiredFieldValidator control. The RequiredFieldValidator EnableClientScript property has the value false. The following video demonstrates how the AsyncFileUpload control works: You can learn more about the properties and methods of the AsyncFileUpload control by visiting the following page: http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/AsyncFileUpload/AsyncFileUpload.aspx Conclusion In the May 2011 release of the Ajax Control Toolkit, we addressed over 30 bugs related to the ModalPopup and AsyncFileUpload controls. Furthermore, by building on code submitted by the community, we enhanced the ModalPopup control so that it supports animation (Thanks Dani). In our next sprint for the June release of the Ajax Control Toolkit, we plan to focus on the HTML Editor control. Subscribe to this blog to keep updated.

    Read the article

  • How can I trigger a server-side event from a client-side event?

    - by danish
    Short version All I need is that, in a ModalPopUp, when the DoubleClick event of a ListItem fires, the click event of my OK button should be executed. Detail I have a ModalPopUpExtender, which hosts a user control. The user control has an OK and a Cancel button. Along with that, it has a dynamic ListBox added to it. So far, I've considered the following possible solutions: Use Ajax.Net. But, I cannot afford to have a WebMethod. Use a ClientScriptCallBack. This will need a lot of JavaScript, since I have made almost every control dynamic. Is there any other way apart from using an UpdatePanel?

    Read the article

  • JQuery Click Event Problem

    - by hari
    Im creating modal popup using jquery. Im firing the modal pop up through button click event and the corresponding code here $(document).ready(function () { $("#Button1").click(function () { el = document.getElementById("overlayDiv"); el.style.visibility = "visible"; el1 = document.getElementById("progress"); el1.style.visibility = "visible"; el2 = document.getElementById("image"); el2.style.visibility = "hidden"; }); }); This works when I click the button at first, after that it doesnt works. Thanks, Hari.

    Read the article

  • I have 5 links that open the same modalpopup?

    - by JPJedi
    I have 5 links that are on the same form but I would like them all to reference the same AJAX modalpopup extender. I am basically showing a panel with the same view layout with just different data depending on which link is pressed, showing different match scores from games. The only way I can get it to work is have 5 panels with unique names and each link references its own panel. Can I get all the links to call one panel? Thanks

    Read the article

  • Is it possible to create a UINavigationController within a ModalPopup?

    - by aloo
    Hi I have a modalViewController that I am popping up using [self presentModalViewController:myController animated:YES]; I have an event occurring within myController which I would like to result in another controller being pushed onto the navigation stack ON TOP OF myController (which again has been presented modally). How can I do this? I have tried the following from within myController: UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:self]; NewController* n = [[NewController alloc] init]; [navController pushViewController:n animated:YES]; [n release]; This does not work however....

    Read the article

  • ASP.NET: ModalPopupExtender prevents button click event from firing

    - by C. Griffin
    Here is what I'm trying to do: Click a button on my page, which in turn makes (2) things happen: Display a ModalPopup to prevent the user from pressing any buttons or changing values Call my code behind method, hiding the ModalPopup when finished Here is the ASP markup: <asp:UpdatePanel ID="UpdatePanel2" runat="server" ChildrenAsTriggers="true" UpdateMode="Always"> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnSaveData" EventName="Click" /> </Triggers> <ContentTemplate> <asp:Panel ID="pnlHidden" runat="server" style="display: none;"> <div> <h1>Saving...</h1> </div> </asp:Panel> <cc1:ModalPopupExtender ID="modalPopup" BackgroundCssClass="modalBackground" runat="server" TargetControlID="btnSaveData" PopupControlID="pnlHidden"> </cc1:ModalPopupExtender> <asp:Button ID="btnSaveData" runat="server" Text="Save Data" OnClick="btnSaveData_Click" /> </ContentTemplate> </asp:UpdatePanel> Now, here is my code behind C# code: protected void btnSaveData_Click(object sender, EventArgs e) { UpdateUserData(GetLoggedInUser()); modalPopup.Enabled = false; } Why doesn't this work? The ModalPopup displays perfectly, but the btnSaveData_Click event NEVER fires.

    Read the article

  • Setting up a button to trigger both modalPopupExtender and his Click Method

    - by Vitor Reis
    Hey guys, I have this modalPopupExtender, I want it to show a CheckBoxList with some data. I have set up a button to call both the method to fill the CheckBoxes and trigger the modalPopup (TargetControlID). they're all inside an UpdatePanel. with the right triggers. The problem is that when I click the button it shows the modalPopup but doesn't load the method to fill my CheckBoxes... Also, a linkButton inside the poup (linkButtonCheckAll) just closes the popup when clicked. When I remove the modalPopup the code works just fine and the list is loaded dinamically with the UpdatePanel. <asp:UpdatePanel ID="uppLote" runat="server"> <ContentTemplate> <ajaxToolkit:ModalPopupExtender ID="modalLote" runat="server" BehaviorID="popup" TargetControlID="buttonViewLote" PopupControlID="panelLote" /> <asp:Panel ID="panelLote" runat="server" CssClass="modalpopup"> <asp:LinkButton ID="linkButtonCheckAll" runat="server" Text="Check All Items" onclick="linkButtonCheckAll_Click"></asp:LinkButton> <asp:CheckBoxList ID="checkListLote" runat="server"> </asp:CheckBoxList> </asp:Panel> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="linkButtonViewLote" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="linkButtonCheckAll" EventName="Click" /> </Triggers> </asp:UpdatePanel> If I completely remove the modalPopupExtender, the code works fine, showing me the list I want with the method "linkButonViewLote_Click" (so, the problem is occurring due to the button triggering the modalPopupExtender is the same that I'm using to get my data, right? Any solutions?

    Read the article

  • modalpopupextender.Show() wont fire

    - by Peter Lea
    I'm pretty new to developing for the web so bare with me. I have a company page with multiple locations and emails etc at each of these addresses. The idea is to have a single modalpopup to edit each type of data (one for email, one for urls, one for addresses etc). I link the modalpopupextender to a hiddenbutton and then call an edit function from various places where I can populate some hiddenfields and textboxes in the panel before showing it. The code executes but it just wont show the damn popup, I just see a flash and can't figure out if its my panel, my css or something I don't understand about ajax and postbacks etc. Things i've tried after reading various threads: Disable smart navigation in web.config Move ToolKitScriptManager up to master page and use proxy in content set hiddenbutton to use style="display:none" tried links etc instead of hidden button Heres my code CSS .modalBackground { position: absolute; z-index: 100; top: 0px; left: 0px; background-color: #000; filter: alpha(opacity=60); -moz-opacity: 0.6; opacity: 0.6; } .modalPopup { background-color: #FFD; border-width: 3px; border-style: solid; border-color: gray; padding: 3px;} Asp/html <ajaxToolkit:ModalPopupExtender runat="server" ID="mpe_email" BackgroundCssClass="modalBackground" PopupControlID="modal_email" CancelControlID="btn_cancel_email" TargetControlID="fake_btn_email" /> <asp:Button ID="fake_btn_email" runat="server" Text="email" style="display:none;" /> <asp:panel id="modal_email" runat="server" class="modalPopup" Width="500px" Height="500px"> <asp:HiddenField ID="hf_modal_email_location_id" runat="server" Value="" /> <asp:HiddenField ID="hf_modal_email_contact_id" runat="server" Value="" /> <asp:HiddenField ID="hf_modal_email_comms_id" runat="server" Value="" /> <table width="100%"> <tr> <td> <asp:Label ID="lbl_mpe_email_title" runat="server" Text="Edit Email Address" /> </td> </tr> <tr> <td> <table width="100%"> <tr> <td width="40px"><img src="../images/email.png" height="30px" width="30px"/></td> <td> <table width="100px"> <tr> <td><span>Quick Ref: <asp:TextBox ID="txb_mpe_email_qref" runat="server" Text="" /></span></td> </tr> <tr> <td><span>Email Address: <asp:TextBox ID="txb_mpe_email_address_full" runat="server" Text="" /></span></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td width="40px" align="left"><asp:Button ID="btn_cancel_email" runat="server" Text="Cancel"/></td> <td align="right"><asp:Button ID="btn_save_email" runat="server" Text="Save" OnCommand="save_modal_email" /></td> </tr> <tr> <td colspan="2" align="right"><asp:Label ID="lbl_mpe_email_err" runat="server" Text="" /></td> </tr> </table> c# public void oloc_ocon_email_edit(object sender, RepeaterCommandEventArgs e) { switch (e.CommandName) { case "edit": hf_modal_email_location_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_location_id")).Value; hf_modal_email_contact_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_contact_id")).Value; hf_modal_email_comms_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_comms_id")).Value; lbl_mpe_email_title.Text = "Edit Email Address"; txb_mpe_email_qref.Text = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_qref")).Value; txb_mpe_email_address_full.Text = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_email_full")).Value; lbl_mpe_email_err.Text = ""; mpe_email.Show(); break; case "new": hf_modal_email_location_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_location_id_p")).Value; hf_modal_email_contact_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_contact_id_p")).Value; hf_modal_email_comms_id.Value = "0"; lbl_mpe_email_title.Text = "New Email Address"; txb_mpe_email_qref.Text = ""; txb_mpe_email_address_full.Text = ""; lbl_mpe_email_err.Text = ""; mpe_email.Show(); break; } } Stuff makes so much more sense in a desktop environment, I hope someone can point me in the right direction. Thanks

    Read the article

  • how to clear the textbox value of asyncfileupload .. ?

    - by AmiT
    There is one button(MyButton). OnClick of this button a modalpopup(MyPopup) appears with one asyncfileupload ajax control, Ok button and Cancel button. The browse functionality of the asyncfileupload functionality is working fine, No problem. But after postback, if I click the MyButton again, the popup appearing with the previous path in the asyncfileupload control's textbox. How to clear it ... ! Thanks in advance.

    Read the article

  • Extender controls must be registered using RegisterExtenderControl() before calling RegisterScriptDe

    - by Khurram Aziz
    I am trying to deploy a web application built with Dotnetnuke. There is an DNN Control/ASCX having a MultiView and few AjaxToolkit Controls like AutoComplete, ModalPopup. In Views other (plain) ASCXs are included and some of which have UpdatePanel. On the developer machine (WinXp / ASP.NET Web Server) there is no error...but when I try to deploy it on server, I get the above error.

    Read the article

  • Show alert message box from the Global.asax (on Application_Error event)

    - by Albert
    Normally I just redirect to a custom error page in on the Application_Error event, but I have a specific error for which I'd like to display an alert message while the user is still on the page which triggers the error. How can I make this happen? I'm open to a modalpopup or any other type of error message, I just want to ensure the user stays on the page where they encounter the error. Thank for any ideas.

    Read the article

1 2  | Next Page >