Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #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-----
<asp:RegularExpressionValidator
id="REVV" runat="server"
ErrorMessage="Hello not a pic"
ControlToValidate="fn"
ValidationExpression="^(([a-zA-Z]:
)|(\\{2}\w+)\$?)(\\(\w[\w].*))+
(.bmp|.jpeg|.png|.gif|.avi)">
</asp:RegularExpressionValidator>

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
eg.
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
Default

daffodils:
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.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:34 PM.


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