.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

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

Posted By:      Posted Date: August 24, 2010    Points: 0   Category :ASP.Net

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

View Complete Post

More Related Resource Links

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 ?

AJAX SlideShowExtender doesn't work, but I don't know why.

I try to use an AJAX SlideShowExtender, but I can't get it to work.This is my default.aspx code:<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestConnectionString._Default" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <!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></title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:Panel ID="SlideShowPanel" runat="server"> <asp:SlideShowExtender ID="SlideShowExtender1" runat="server" TargetControlID="Image1" SlideShowServiceMethod="GetSlides" AutoPlay="True" Loop="True" PlayInterval="1000">

Why doesn't this update panel work right?

I don't understand why this update panel doesn't work right.   It doesn't do a partial update.  Enable partial page rendering is set to true but clicking the button causes a full page post back.  The text of the label changes with the full post back. So, the event is firing and being handled but not with a partial post back.    This is with in a content page with in a Master Page.Does anyone see what I've done wrong? <asp:ScriptManager ID="MainScriptManager" runat="server" EnablePartialRendering="true"></asp:ScriptManager> <asp:UpdatePanel ID="pnlHelloWorld" runat="server" UpdateMode="Always"> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnHelloWorld" EventName="Click" /> </Triggers> <ContentTemplate> <asp:Label ID="lblHelloWorld" runat="server" Text="Click the button!"></asp:Label> <br /><br /> <asp:Button runat="server" ID="btnHelloWorld" OnClick="btnHelloWorld_Click" Text="Update label!" /> </ContentTemplate> </asp:UpdatePanel> protected void btnHe

User Control with JQuery doesnot work inside update panel


Hi All,

I created a .NET user control to work as a DropdownCheckbox and added Jquery to give the sliding and hide effects. The code is as below:

 <script language="javascript" type="text/javascript">
        var showRegionWindow = function (ev) {
            var pos = $("#lnkChangeRegion").offset();
            var width = 230;
            var height = 55;
            //$("#changeRegionPanel").css({ "left": +((pos.left) - 215) + "px", "top": height + 16 + "px" });.
            document.getElementById("lnkChangeRegion").style.display = 'none';

        var hideRegionWindow = function (ev) {
            var textVal = "";

Ajax AsyncFileUpload control not working in IE7.0 and IE8.0 browser in Integrated Windows Authentica



I am facing problem using Ajax AsyncFileUpload control in IE7.0 and IE8.0 browsers. 

It is working fine in local environment, when you deploy the code in Windows Server 2003 (IIS6.0) with Integrated Windows Authentication mode it is not working properly in IE7.0 and IE8.0 browsers. 


I am doing the validation in client side using OnClientUploadStarted, OnClientUploadComplete it is working fine but once click on any other button (server side) getting the error Internet Explorer cannot display the webpage (Diagnose Connection Problem) in IE7.0 and IE8.0 browser. Same thing is working fine in other browsers.

ajax AsyncFileUpload control is not working with IE9


AsyncFileUpload  not working with IE9. only on capability mode

WPF Custom Control template doesn't work



I've created a WPF custom control that goes in a DLL and I'm trying to use the control in another project.  Everything works fine except for the part of getting the control template to work. I should get an Orange background as defined below but the control just shows empty in the XAML editor and in runtime.

The code is as follows:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace MyCustomControl
    public class CustomCtrl : System.Windows.Controls.Control
        public static readonly System.Windows.DependencyProperty ValueProperty;
        public string Value
            get { return (string)GetValue(CustomCtrl.ValueProperty); }
            set { SetValue(CustomCtrl.ValueProperty, value); }

        static CustomCtrl()

page inside update panel doesn't refresh the session object after postback of any control



I have many controls like dropdown, radiobuttonlist, etc on my page and I put all these controls inside the update panel so that the page doesn't look to be posting back when something is selected. Now the working on the page is very smooth. But the session object isn't getting refreshed even if I postback to the server and as a result even if the users are working on the page they are being sent to the login screen after 20 mins.

Is there anyway where I could put all the controls in update panel and still refresh the session after any postback(dropdown selection)

Any help is greatly appreciated.

Thanks in advance

problem with ajax control while upgrading website from 3.5 to 4.0 frame work



i am working on asp.net website.

on my web page i  submit some data on click at button , this block is inside update panel.

this functionality working fine in 3.5 frame work.

Now  our website is using 4.0 frame work.

controls inside update panel giving following error on submting data :

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500.

 thanks in advance

Problem with the Ajax AsyncFileUpload control


I know what you're thinking: "oh, no. Not another one" :)

This is just some strange behavior I have observed on a user's machine.  During testing, and most of the time in production, the upload control has been working fine, but I am running into a problem.  I will preface this by saying that I have only seen this problem occur with a user running IE7, and that I don't know what their security settings are because the client has everyone's setting locked by group policy.

The problem is this:

The user browses for a file, selects one, and the file is uploaded immediately.  Everything fine there, but then they click on any other control on the page and the upload control immediately begins uploading again. Often, it seems, this second upload fails.  At the very least it is very time consuming and irritating for the users, since this second upload "cancels" the server request for the control they actually clicked on.

The AsyncUploadControl is not inside of any update panels, although there are several in use on the page. I've even seen this behavior when a user expands a DropDownList control with its "AutoPostback" property set to true.

I have gotten reports from several users at this client (this client accounts for 2/3 of the people using the system) that they are having problem

Accordion control doesn't work


Hello. I am having quite a bit of trouble getting an accordion control to work. I downloaded the AJAX Control TOolkit (v 3.5), added the dll to my toolbox, and added an accordion control with the following code:

            <asp:AccordionPane ID="P" runat="server">
                   The President ...
            <asp:AccordionPane ID="VP" runat="server">
                <Header>Vice President</Header>
                   The Vice President ...                </Content>
            <asp:AccordionPane ID="T" runat="server">
                   The Treasurer ...                </Content>

ASP.NET AJAX control does not work on Apache server


hi all, 

i am using mod_aspdotnet.so module to hosting my ASP.NET application. all was ok until i use ajax control tool kit in my aplication. 

I am using ajaxToolkit:CascadingDropDown to conect 2 dropdownlist in cascade. In IIS every thing works fine, but in apache there are some problems. When load the page, i got the next javascript error: 'Sys' undefined. 

the object signed are :

Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('MAIN_FORM'));


How can i solve this problem???

thx in advance!

CheckBox Control in Ajax Update Panel


Is there anything special I need to do with a CheckBox control placed inside an Ajax Update Panel?  I've use the update panel many times before with other .NET controls, but for some reason the CheckBox control isn't triggering it's oncheckedchanged event.  Here's what I have:


<span style="position:relative; left:410px; top:0px">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <asp:CheckBox ID="_cbTrack" runat="server" 
                                            Text="Track Carrier" 

GridView Multiple Filter AJAX Control

This AJAX control enables the user to filter data within any column inside a GridView. The user can add multiple filters and can delete existing ones too.

watermark textbox using Ajax control

This is pretty simple compared to jquery. Since we need refer a dll only. we dont want any script for this. we just include that reference into our website.

Looking for guidance: wanting to work with AJAX architecture



I'm starting a small website that will be backed by a database, and will allow a small number of users to authenticate and select an entry in the database, and then view (and optionally update) a corresponding entry (think master-detail).

I have some flexibility in how I'll do this, but I'd really like to incorperate some newer AJAX style coding, eliminating some page postbacks. I think this is a great opportunity to learn the concepts well.

I'll probably go with an ASP.NET 4.0 site. From what I've seen there are MANY ways to go about this:

-WCF Data Services to expose the data, and consume in ASP.NET

-Page methods to expose the data, separate method to update the data

-I'd rather avoid the UpdatePanel because I'm really looking for a full hands-on approach, with learning client side scripting being an objective as well.

Beyond that, it seems that one can use jQuery to build clientside templates, but also one can use the ASP.NET AJAX template engine (in ASP.NET 4.0 I believe).

A concern I have: users should only be able to work with the data exposed via these endpoints if they are logged into the website. Hopefully I can somehow reuse the ASP.NET forms authentication cookie for this purpose. 

Well, I hope I've posted enough to a

VWDE 2010 Won't Install Ajax Control Toolkit on XP Pro


To my displeasure I cannot find VWD2005 which at one time would generate a complete web.config for Ajax so I downloaded and installed VWDE 2010 to a clean install of XP Pro.

I've created a new tab on the toolbar for the controls but after I select the Ajax dll to add the controls to the toolbar it grinds away and then goes poof and closes down the task leaving VWD look as if I had never even created the tab in the toolbar. 


Any advice here?

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