navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

firefox vs ie textbox probs

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> firefox vs ie textbox probs
Page: [1]
 
yogaboy

 

Posts: 377
Joined: 5/22/2004
Status: offline

 
firefox vs ie textbox probs - 10/27/2005 17:22:57   
Good e'en

I'm building a file upload page in .net and using an html input control of type file eg <input type="file".... , but firefox and ie are returning different strings.

Firefox returns just the filename eg myfile.txt and not the path to the file, and IE is returning the full path ie c:\mydir\myfile.txt

I was wondering if anyone else had come across this or any ideas how to get them to behave the same?
jaybee

 

Posts: 14191
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: firefox vs ie textbox probs - 10/27/2005 17:59:01   
Sounds like a .net issue. I have no idea how well FF handles it. Is there a .net forum around? If so I'd check there as somebody else is bound to have come across it.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to yogaboy)
yogaboy

 

Posts: 377
Joined: 5/22/2004
Status: offline

 
RE: firefox vs ie textbox probs - 10/28/2005 7:15:33   
Ok. Thought I'd check here first to see if it's just a general input control issue before trawling the .net angle.

Thanks.

(in reply to jaybee)
yogaboy

 

Posts: 377
Joined: 5/22/2004
Status: offline

 
RE: firefox vs ie textbox probs - 10/28/2005 9:50:41   
Ok, I've found an answer through a bit of fiddling around with code, so I'll post it up incase anyone else comes across this with the same problem (how thoughtful I can be! :) )

instead of accessing the filename through
string filename = File1.PostedFile.FileName;

where File1 is the id of the input control, use this instead

System.IO.Path.GetFileName(File1.PostedFile.FileName);


and to get the dir use System.IO.Path.GetDirectoryName or any other overload you need. This will harmonize the returned values from FF or IE etc.

(in reply to yogaboy)
Page:   [1]

All Forums >> Web Development >> General Web Development >> firefox vs ie textbox probs
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts