how can i remove "no guardo"

Aug 27, 2008 at 10:07 AM
Please tell me how can i remove "no guardo" after selected a file through browse function
Sep 2, 2008 at 8:47 PM
Edited Sep 2, 2008 at 9:18 PM

Try this (vb.net):

After your save command, assuming all was successful ...

 

 

With FileUploaderAJAX1

 

.SaveAs(

"~\UploadedImages", pf.FileName)

 

 

'remove all instances of the "no guardado" message from the filenames

 

 

If .PostedFile.responseMessage_Uploaded.IndexOf(" no guardado") > 0 Then

 

.PostedFile.responseMessage_Uploaded = .PostedFile.responseMessage_Uploaded.Replace(

" no guardado", "")

 

 

End If

 

 

If .PostedFile.responseMessage_Uploaded_NotSaved.IndexOf(" no guardado") > 0 Then

 

.PostedFile.responseMessage_Uploaded_NotSaved = .PostedFile.responseMessage_Uploaded_NotSaved.Replace(

" no guardado", "")

 

 

End If

 

 

If .PostedFile.responseMessage_Uploaded_Saved.IndexOf(" no guardado") > 0 Then

 

.PostedFile.responseMessage_Uploaded_Saved = .PostedFile.responseMessage_Uploaded_Saved.Replace(

" no guardado", "")

 

 

End If

 

 

End With

 

 


Hope it helps.
Tim

 

 

Nov 12, 2008 at 9:21 PM
Or... you can just download the code and take that out of there.
Dec 11, 2008 at 9:40 PM
I've done it like so:


    protected void Page_Load(object sender, EventArgs e)
    {
        if (FileUploaderAJAX1.IsPosting)
            this.managePost();
    }


    private void managePost()
    {
        HttpPostedFileAJAX pf = FileUploaderAJAX1.PostedFile;

       // Save if it's an image
        if (pf.Type == HttpPostedFileAJAX.fileType.image)
        {
            FileUploaderAJAX1.SaveAs(Page.ResolveUrl("~/Images/Thumbnails/"), pf.FileName);
        }

        FileUploaderAJAX1.PostedFile.responseMessage_Uploaded_NotSaved = "<span style=\"font-family: arial; font-size: 12px;\">Sorry, there was a problem uploading this file.</span>";
    }