Click here to Skip to main content
15,921,467 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Generaladding items from datagrid to a table Pin
nigel200013-Dec-07 7:27
nigel200013-Dec-07 7:27 
GeneralRe: adding items from datagrid to a table Pin
pmarfleet13-Dec-07 10:57
pmarfleet13-Dec-07 10:57 
GeneralRe: adding items from datagrid to a table Pin
nigel200013-Dec-07 20:51
nigel200013-Dec-07 20:51 
GeneralGridView, DetailsView and multiple primary keys. Pin
Fernando A. Gomez F.13-Dec-07 6:32
Fernando A. Gomez F.13-Dec-07 6:32 
GeneralRe: [solved] GridView, DetailsView and multiple primary keys. Pin
Fernando A. Gomez F.13-Dec-07 8:11
Fernando A. Gomez F.13-Dec-07 8:11 
QuestionApp not sending all values in the textbox to the database Pin
Jedidah13-Dec-07 5:00
Jedidah13-Dec-07 5:00 
GeneralRe: App not sending all values in the textbox to the database Pin
Christian Graus13-Dec-07 9:45
protectorChristian Graus13-Dec-07 9:45 
GeneralHTML.FileInput in ASP.net 1.1 Project Pin
JonathanMX13-Dec-07 4:08
JonathanMX13-Dec-07 4:08 
Hello All,

I have a boggling question (For myself anyway)

First of all, here is the code.

If Not FILE1 Is Nothing Then
If Not FILE1.PostedFile.FileName = "" Then

Dim sFile As String
'sFile = UID & "_" & Replace(FILE1.PostedFile.FileName.Substring(FILE1.PostedFile.FileName.LastIndexOf("\")), "\", "")
sFile = UID & "_" & FILE1.PostedFile.FileName
'spath = Server.MapPath("\files\") & UID & Path.GetFileName(FILE1.PostedFile.FileName)

FILE1.PostedFile.SaveAs(Server.MapPath("../Files/" & sFile))
sql = "update events set eventfile='" & sFile & "' where eventid=" & UID
myCom = New SqlCommand(sql, myCon)
myCom.ExecuteNonQuery()
Else
sql = "update events set eventfile= '' where eventid=" & UID
myCom = New SqlCommand(sql, myCon)
myCom.ExecuteNonQuery()

End If
End If

The problem is, most machines (All to my knowledge with the exception of one) work fine with this code. They can upload files with no problems, shove the path in a DB, and carry on like normal.

One client cannot. The error she recieves is looking like instead of passing the filename as sole, it is passing her local filepath as well..

Here is the error:

Server Error in '/' Application.

--------------------------------------------------------------------------------

'../Files/210_G:\OH&S Certification Training\Marketing Info\Spring 2008.doc' is not a valid virtual path.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: '../Files/210_G:\OH&S Certification Training\Marketing Info\Spring 2008.doc' is not a valid virtual path.



The String '../Files/210_G:\OH&S Certification Training\Marketing Info\Spring 2008.doc' should simply be '../Files/210_Spring 2008.doc'

Any ideas on why this client is having such a problem? All help is greatly appreciated.. and if possible I would email some brewskies. Big Grin | :-D

Thanks in advance.
QuestionAjax error! Pin
Agweet13-Dec-07 3:42
Agweet13-Dec-07 3:42 
GeneralRe: Ajax error! Pin
Sam Xavier13-Dec-07 22:33
Sam Xavier13-Dec-07 22:33 
GeneralRe: Ajax error! Pin
Agweet13-Dec-07 22:53
Agweet13-Dec-07 22:53 
GeneralRe: Ajax error! Pin
Sam Xavier14-Dec-07 0:23
Sam Xavier14-Dec-07 0:23 
GeneralRe: Ajax error! Pin
Agweet14-Dec-07 0:56
Agweet14-Dec-07 0:56 
QuestionCrystal Reports in asp.net 2005 Pin
zareee13-Dec-07 0:46
zareee13-Dec-07 0:46 
GeneralRe: Crystal Reports in asp.net 2005 Pin
zareee13-Dec-07 19:33
zareee13-Dec-07 19:33 
GeneralRe: Crystal Reports in asp.net 2005 Pin
Elizma13-Dec-07 19:47
Elizma13-Dec-07 19:47 
QuestionHow to get it? Pin
Imran Khan Pathan12-Dec-07 21:05
Imran Khan Pathan12-Dec-07 21:05 
AnswerRe: How to get it? Pin
Abhijit Jana12-Dec-07 21:45
professionalAbhijit Jana12-Dec-07 21:45 
GeneralRe: How to get it? Pin
Imran Khan Pathan12-Dec-07 22:08
Imran Khan Pathan12-Dec-07 22:08 
GeneralRe: How to get it? Pin
Paddy Boyd12-Dec-07 22:13
Paddy Boyd12-Dec-07 22:13 
GeneralRe: How to get it? Pin
Imran Khan Pathan12-Dec-07 22:15
Imran Khan Pathan12-Dec-07 22:15 
GeneralRe: How to get it? Pin
Paddy Boyd12-Dec-07 22:21
Paddy Boyd12-Dec-07 22:21 
GeneralRe: How to get it? Pin
Usharva12-Dec-07 22:16
Usharva12-Dec-07 22:16 
GeneralRe: How to get it? Pin
harunbagwan13-Dec-07 19:16
harunbagwan13-Dec-07 19:16 
GeneralRe: How to get it? Pin
harunbagwan13-Dec-07 19:17
harunbagwan13-Dec-07 19:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.