.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Are ModalPopupExtender and AsyncFileUpload.OnClientUploadComplete incompatible?

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :ASP.Net
A ModalPopupExtender works fine with a panel as the target control and the panel has an AsyncFileUpload control. However as soon as AsyncFileUpload.OnClientUploadComplete is set to something (e.g. onclientuploadcomplete="alert('hello');"),  the panel is not hidden on page load.Is there any compatibility issue here?

View Complete Post

More Related Resource Links

AsyncFileUpload doesn't display in ModalPopupExtender


As far as I can see, the following code should make an AsyncFileUpload display in ModalPopupExtender. The MPE shows fine but the AsyncFileUpload doesn't load inside it. Please let me know if you see anything amiss. I also tried removing the update panel and putting the divs both inside and outside of the update panel, all with the same (lack of) results. And the AsyncFileUpload displays and works outside of the MPE.

In ListView EditItemTemplate:

<asp:UpdatePanel ID="udpUpload" UpdateMode="Conditional" runat="server">
        <div class="profile-with-border">
            <asp:Button ID="btnUpload" Font-Bold="False" TabIndex="160" Text="Upload/Change Photo"
                OnClick="btnUpload_Click" UseSubmitBehavior="False" runat="server" />
            <br />
            <atk:ModalPopupExtender ID="mpeUpload" BackgroundCssClass="modalBackground" DropShadow="true"
                OkControlID="btnOK" CancelControlID="btnClose" PopupControlID="pnlPopup" TargetControlID="btnUpload"
                OnOkScript="mpeUpload_OK" runat="server" />

how to refresh image updated with AsyncFileUpload


I've created an AsyncFileUpload device that uploads an image in ListView but it doesn't refresh on the page until the page is manually refreshed. Any ideas on how to accomplish this? This is the applicable code:

In ListView control:

<asp:UpdatePanel ID="udpPhoto" runat="server">
        <span style="text-align: center; vertical-align: middle; font-size: 7pt;">
            <br />
            <asp:Button ID="btnEPhoto" Font-Bold="False" TabIndex="160" Text="Upload/Change Photo"
                UseSubmitBehavior="False" OnClick="btnPhoto_Click" runat="server" />
            <br />
            <asp:Label ID="lblEPhoto" runat="server" Font-Bold="True" Text="Uploaded Photo:" />
            <br />
            <asp:HyperLink ID="lnkEPhoto" runat="server" BorderWidth="2px" NavigateUrl='<%# Eval("Photo_Recent") %>'
                <asp:Image runat="server" ImageUrl='<%# Eval("Photo_Recent") %>' Height="50px" ID="imgEPhoto">

AsyncFileUpload is not uploading the file



I have added AsyncFileUpload to creata user wizard control. When I tried to upload the file this control seemed to work fine and show confirmation at the end. But when I checked the website no file has been uploaded at all.

Here is the code, please let me know why its not uploading the files/images

<asp:ToolkitScriptManager ID="ScriptManager1" runat="server"></asp:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server"  
 FinishDestinationPageUrl="~/MyPage.aspx"                                     LoginCreatedUser="False" CreateUserButtonText="Add" oncreateduser="CreateUserWizard1_CreatedUser1" 
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server" >
<asp:WizardStep ID="WizardStep1" runat="server" Title="Set preferences">
<asp:AsyncFileUpload ID="AsyncFileUpload1" runat="server" ThrobberID="spanUploading" OnClientUploadError="

Ajax Asyncfileupload doesn't work as soon as I put it in a control


Hi guys,

I can't get my <ajax:asyncfileupload> working and I don't see why...

When outside any panel or table it is working well, but as soon as I put it in a <asp:panel> or table I get a strange error which seems to be on client-side but I don't understand what's happen here. Here is the code and code-behind and Javascript.

Here's the error: 


Here's my front-code:

<%@ Page Language="VB" MasterPageFile="~/masterpages/mpSqueletton.master" AutoEventWireup="false" CodeFile="frmAdmGestSocietes.aspx.vb" Inherits="adm_frmAdmGestSocietes" title="Untitled Page" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
<script type="text/javascript" language="javascript">    
        function uploadError(sender,args)
          document.getElementById("<%= lblStatus.ClientID %>").innerText = args.get_fileName(), "<span style='color:red;'>" + args.get_errorMes

ModalPopupExtender animated gif not animating


Hi, I'm trying to use the modalPopup extender to show a "processing" message with an animated gif.  Everything works pretty well except that any animated gif I place in the modalextender doesn't animate.  Anyone know of this problem and a solution?


html for the popup div:

<div align="center" style="margin-top: 13px; vertical-align: middle; display: none"

class="modalPopup" id="modalPanel" runat="server">

<table border="0"

AsyncFileUpload: Throw Error on image size


I have an AsyncFilUpload that is used to upload  to my site. On the server side I have code that checks the width and height of the image and will only save the image if it is within the limits buit I can't figure out how to get the AsyncFileUpload control to show an error when this happens. Can anyone give me any pointers?


Asyncfileupload doesn't work in webusercontrol

I'm having a problem with a Webusercontrol that has an asyncfileupload control. My websusercontrol is being loaded in a placeholder control that's wrapped by an updatepanel.Due to asyncpostback, I have to load and clear the placeholder's controls. The webusercontrol works flawlessly, except the asyncfileupload, which doesn't want to upload at all. I can assure that the code is without error, because I used to have the webusercontrol running as an *.aspx site. I guess that the problem is the fact that the control has to be cleared and reloaded with every asyncpostback ?

AjaxToolkit:ComboBox not working in ModalPopupExtender

Hello,I have two nested modal popup. The ComboBox does not work as expected as you can see frome this screenshot. As you can see it misses:The list is not visible even if I think that is in the background. In fact the "SuggestAppend" works perfectly.The ComboBox arrow button is not visible. On zooming the green circle you can see that it shrinked to a size of 4x4 pixelsAdditional info: jquery is used for tabs & datePicker (in the first popup) and Buttons (always)EDIT: Forgot to include  the server side code. Here it is:<ajaxToolkit:ComboBox ID="dataPhoneType2" runat="server" DataSourceID="phoneTypeDS" DataValueField="PhoneTypeId" DataTextField="Description" AutoPostBack="False" DropDownStyle="DropDownList" AutoCompleteMode="SuggestAppend" RenderMode="Inline" CaseSensitive="False"></ajaxToolkit:ComboBox>Is this a bug?Regards

Operand type clash: xml is incompatible with text

hi to all .thank in advance ..i am using sql server .i want insert below xml into one column in table which is xml data type but i am getting error Operand type clash: xml is incompatible with text .pls tell me solution for this ?<Message xmlns="http://www.abcscripts.com/messaging"><Header><To>mailto:6033168728001.spi@abcscripts.com</To><From>mailto:9900007.ncpdp@abcscripts.com</From><MessageID>541481b182404a3ea819f0aba886e652</MessageID><RelatesToMessageID/><SentTime>2010-08-23T18:27:28.2Z</SentTime></Header><Body><RefillRequest><RxReferenceNumber>163U067PL4E5LYK0D1EGXTA57JUW5HCFQ4B</RxReferenceNumber><Pharmacy><Identification><NCPDPID>9900007</NCPDPID><FileID>TW1FKB1P1H2P468L3L7RM812GR7X5O70VQ3</FileID><StateLicenseNumber>5602NPPQGU765FX7262US8X6G18NMG67H47</StateLicenseNumber></Identification><StoreName>Druglix</StoreName><Pharmacist><LastName>Pharmacist last name goes here noww</LastName><FirstName>Pharmacist First name goes in here</FirstName><MiddleName>Pharmacist Middle name goes here</MiddleName><Suffix>Junior iii</Suffix><Prefix>Pharmacist</Prefix></Pharmacist><PharmacistAgent><LastName>Pharmacist agent Last name go


Dear Experts,Is it possible to include asncFileUpload in ajax 1.0 (visual Studio 2005), If yes can you please help me?thanks in advance

ModalPopupExtender don´t show panel by code

Hi all,   I´m trying to do a simple thing using asp.net. I wanna show a modal popup panel from a server procedure with vb.net.  The error is: The popup don´t show when I click cmdTest Button. OBS: I used cmdTest just to call the procedure.  In my project, one button call a procedure that will or not call other procedure that will or not show the panel. Can anyone please tell me what´s wrong with the following code ?   Thanks in advance ...   -- aspx --<%@ Page Title="" Language="VB" MasterPageFile="~/Principal.master" AutoEventWireup="false" CodeFile="Autores.aspx.vb" Inherits="Autores" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:Button ID="cmdTest" runat="server" Text="Click Here" /> <asp:Button ID="cmdHidden" runat="server" Text="HiddenButton" Visible="false" /> <asp:ToolkitScriptManager ID="ToolkitSc

Cannot get Asyncfileupload to fire UploadComplete event... :(

hey everyone!I cannot get the asyncfileupload to fire the uploadcomplete event at all. I did a test:    Protected Sub AsyncFileUpload1_UploadedComplete(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs) Handles AsyncFileUpload1.UploadedComplete         Dim currentUser As MembershipUser = Membership.GetUser()         Dim currentUserId As Guid = CType(currentUser.ProviderUserKey, Guid)         errorLabel.Text = "Test"     End Sub    Protected Sub AsyncFileUpload1_UploadedComplete(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs) Handles AsyncFileUpload1.UploadedComplete       errorLabel.Text = "Test"    End Suband... nothing. The background turns green, my throbber activates successfully.. but then, I get nothing. It doesnt even make it to the uploadedComplete event. I also did the same test in the error event.. and still nothing. Any ideas??

Reload IFrame+ModalPopUpExtender Content

Hi all, I have a small issue with ModalPopupExtender. It opens in an Iframe initially, and shows the page: add_contact.aspx After I have entered the contact details, the IFrame redirects to the contact_details.aspx page to show what I have loaded. The problem is when I close that modalpopup-window and click again to show the modalpopup, the iFrame shows the contact_details.aspx page, and not the add_contact.aspx page. Anyways, I can resolve this, without using modalPopup.show() in code behind? Thanks

The data types varchar and date are incompatible in the add operator

On the following query I keep getting the error 'The data types varchar and date are incompatible in the add operator'.  As you can see I have tried to convert the date but doesn't seem to work.  The variable @Date1 will start off as a date.  Any suggestions? ' declare @Date1 date declare @SQL1 varchar(2000) set @Date1 = convert(varchar, cast(getdate() as date), 102) set @SQL1 = 'select * from tbl_1 where convert(varchar,cast(tbl_1.Current_dt as date),102) = '+@Date1+'' print @SQL1    LISA86

ModalPopupExtender not displaying image

Hi guys,I have a modal popup extender with an asp:image control,  and 2 buttons.I have tried to load the image from a file on the local project folder which I have dynamically created through serverside code, but it will not display the image however I tried.here are the codes of the modalpopupextender and the hidden popup panel:            <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server"                 TargetControlID="lbtn_HiddenLinkButton" BackgroundCssClass="ModalBackground"                 DropShadow="true" OkControlID="btn_DoneCropping"                 CancelControlID="btn_CancelCropping" PopupControlID="pnl_Cropper">            </asp:ModalPopupExtender>            <asp:Panel ID="pnl_Cropper" runat="server" CssClass="ModalPopup" style="display:none">              &

Ajax ModalPopUpExtender inside ModalPopUpExtender

Hi, I have a modal popup extender with one control (ascx) this control has a label that on onclic method call other popup extender. It's has other ascx, it's has a button for a search. When I do Click in this button in first time, the event click not fired and there are a javascript error that say "this._activeDRagVisual is null reference".In the other hand, If a use de second popup inside an asp page the event and control work correctly. The problem is with the popup inside popup.Thanks.

How to clear AsyncFileUpload if page revisited

Hello all,   just downloaded the latest Ajax toolkit and want to use AsyncFileUpload in my project. But the control keeps the path of previously uploaded file if page revisited again (in my case - a popup page). Is there any parameter can be set to clear the path box (it shows previous path in red). You know, the simple something like syncFileUpload.Clear() would of been nice! But it doesnt have it. Any work around? I tried to place it on page Init and set as New but didnt help.   Thanks in advance.   Nat    
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend