Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 30th, 2006, 06:42 AM
Registered User
Join Date: Oct 2006
Location: kolkata, WB, India.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to daffodils
Default Queries On File Field Html Control in ASP.NET 1.1

Hi frenz,
I'm using a File field control to browse and get the path of a file. I can also validate for the type of file I want to browse. Like I'm using the regular expression validator as

'----this is the file field control-----
<INPUT id="fn" type="file" name="fn" runat="server">
'-----this is the validator for fn-----
id="REVV" runat="server"
ErrorMessage="Hello not a pic"

but what I want is that :-

1> to open a particular folder exsisting in my website (http:\\localhost\\website ) in the website folder in wwwroot whenever the browse button is clicked

2> to get the functionality of the OpenFileDialogue control in VB.net of displaying only the file types specified by the filter property
OFD.Filter = "Text Files (*.txt; *.doc)|*.txt; *.doc|" + "Image files (*.bmp; *.gif; *.jpg; *.png)|*.bmp;*.gif;*.jpg;*.png|" + _
"All files (*.*)|*.*"

a.shows only .txt & .doc files when "Text Files" is selected in the File Type field
b.shows only .bmp, .gif, .jpg & .png files when "Image Files" is selected in the File Type field
c.shows all files when "All files" is selected

Can we do these things with the file field control in asp.net 1.1?

There's no defeat untill you stop trying....
  #2 (permalink)  
Old October 30th, 2006, 11:30 AM
Friend of Wrox
Points: 793, Level: 10
Points: 793, Level: 10 Points: 793, Level: 10 Points: 793, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: May 2005
Location: OKC, OK, USA.
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts

My question to you is: Why is the ID-property and the name-property the same on your INPUT statement (="fn")? I suggest changing one of them to be unique.

Hope this helps.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert html to pdf file by using asp.net in c# dey.susanta.kolkata ASP.NET 2.0 Professional 4 September 19th, 2016 07:20 AM
Can I create my own File Field control in ASP.Net vbmazza ASP.NET 1.0 and 1.1 Professional 1 February 22nd, 2006 11:45 AM
What type of field/control for File attachments? Renu ASP.NET 1.0 and 1.1 Basics 2 August 22nd, 2004 06:10 PM
Retrive text from input type field of html file?? bikash Javascript 10 July 30th, 2003 04:50 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.