Hello,
I am using RadUpload control with my application.
When i select the File after browsing through my PC, when i click on Button.
- I want the full path in which drive the file is being located. I have used the code as below :
Now, when i RUN the page & DEBUG using FireFox,
I get the strPath = "SubModule.txt"
and get the error,
But, When i Run with IE,
I get the strPath = "C:\Documents and Settings\OM\Desktop\SubModule.txt"
which works perfectly alright.
Please help me to sort out this Error in Firefox.
Thanks,
Kunal Govani
I am using RadUpload control with my application.
When i select the File after browsing through my PC, when i click on Button.
- I want the full path in which drive the file is being located. I have used the code as below :
| MailMessage objmail = new MailMessage(); |
| if (RadUpload1.UploadedFiles.Count > 0) |
| { |
| foreach (UploadedFile file in RadUpload1.UploadedFiles) |
| { |
| string strPath = string.Empty; |
| strPath = file.FileName; |
| System.Net.Mail.Attachment objattachment = new System.Net.Mail.Attachment(strPath); |
| objmail.Attachments.Add(objattachment); |
| } |
| } |
Now, when i RUN the page & DEBUG using FireFox,
I get the strPath = "SubModule.txt"
and get the error,
| {System.IO.FileNotFoundException: Could not find file 'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\SubModule.txt'. |
| File name: 'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\SubModule.txt' |
| at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) |
| at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) |
| at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) |
| at System.Net.Mail.AttachmentBase.SetContentFromFile(String fileName, String mediaType) |
| at System.Net.Mail.Attachment..ctor(String fileName) |
| at User_SendDocMail.btnsendmail_Click(Object sender, EventArgs e) in e:\Projects\ISalesPro\ISalesProWeb\User\SendDocMail.aspx.cs:line 53} |
But, When i Run with IE,
I get the strPath = "C:\Documents and Settings\OM\Desktop\SubModule.txt"
which works perfectly alright.
Please help me to sort out this Error in Firefox.
Thanks,
Kunal Govani