Not able to Upload video files using ajaxfileupload control in asp.net c#, results into error with red block -
i using ajax toolkit here
i can upload .jpg, .jpeg, .txt, .doc, not able upload .wmv file..ie not able upload videos file.
below code
file.aspx
<asp:ajaxfileupload id="ajaxfileupload1" onuploadcomplete="ajaxupload1_onuploadcomplete" runat="server"/>
file.cs
protected void ajaxupload1_onuploadcomplete(object sender, ajaxcontroltoolkit.ajaxfileuploadeventargs e) { seek { // generate file path string filepath = "~/images/" + e.filename; // save upload file file scheme ajaxfileupload1.saveas(mappath(filepath)); } grab (exception ex) { page.clientscript.registerstartupscript(this.gettype(), "error", string.format("<script type='text/javascript'>alert('{0}')</script>", ex.message.tostring())); } }
i want know wrong... have add together in code can upload video files
hey pritesh have check file size. default 4 mb file upload avail in asp.net if problem of size add together below line in web config file.
<system.web> <httpruntime maxrequestlength="11264" /> </system.web>
value alter per ur req.
c# asp.net ajax
No comments:
Post a Comment