Reputation: 648
Creating one custom control which will have the Async File Upload control. But when i am trying add the Async FileUpload in a control not able to add getting Complie time error. Following is my code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AjaxControlToolkit;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace SBITS.CustomControl
{
class CustomFileUpload:CompositeControl
{
private AsyncFileUpload asyncFileUpload;
private Image throbberImage;
protected override void CreateChildControls()
{
this.throbberImage = new Image();
this.throbberImage.ImageUrl = Constant.THROBBER_IMAGE_PATH;
this.Controls.Add(throbberImage);
this.asyncFileUpload = new AsyncFileUpload();
this.asyncFileUpload.ThrobberID = throbberImage.ID;
this.Controls.Add(asyncFileUpload);
}
} }
getting error on this line
this.Controls.Add(asyncFileUpload);
error screen
Compile time error
Upvotes: 1
Views: 164
Reputation: 648
Got the resolution for the issue
just added the reference of system.web.Extension
to my project and its done.
Upvotes: 2