when i upload image like facebook or orkut i have to show image uploaded successfully.
when i upload other than image like text file ,word,excel,etc..i have to show please select image?......
when i click the button with out pressing browse button i have to write validation for that please select the image..
pleaae help me how to write code for that
Loading
Dhaval PatelPosted Nov 14, 2011, 4:35 AM
please refer below link for Asycfile upload control
http://www.c-sharpcorner.com/Blogs/7361/file-upload-control-using-ajax-and-javascript-in-Asp-Net.aspx
nishant ranjanPosted Nov 12, 2011, 4:57 AM
if (fileup.HasFile)
{
//if pic path is specified in file upload box, then save picture
try
{
string file="pic";
string filename = file + '_' + fileup.PostedFile.FileName;// file name will be pic_abc.jpg
filename = filename.Replace(" ", "");
fileup.PostedFile.SaveAs(Server.MapPath("~/image/") + filename);
}
in design
ControlToValidate="fileup" ValidationGroup="aaa">