FileUpload Control getting null in [Ajax.AjaxMethod]
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
Hi Frends I am using the ASP.Net FileUpload control to upload the file and using AjaxMethod to save the file on Server but I am getting the FileUpload as null...... anybody pls help....
[Ajax.AjaxMethod()]
public bool VerifyUploadedData()
{try { if (FileUpload1.HasFile) { sFileType = System.IO.Path.GetExtension(FileUpload1.FileName); sFileType = sFileType.ToLower(); if (sFileType == ".xls") { string FilePath= System.Configuration.ConfigurationManager.AppSettings\["FilePath"\].ToString(); FilePath = FilePath + FileUpload1.FileName; FileUpload1.SaveAs(Server.MapPath(FilePath)); } }
Thanks
Dinesh Sharma