473,767 Members | 2,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with HtmlInputFile

i have a c# asp.net webform that has an HtmlInputFile and a listbox (to hold
the filenames to be uploaded). but HtmlInputFile.P ostedFile and
HtmlInputFile.V alue are readonly properties. i have to populate the listbox
prior to showing it to the user. the listbox will already contain items (old
files) in it when the user first see it. i am trying to add files to the
HtmlInputFile collection programmaticall y before letting the user add or
remove files. this will allow the user to remove them (old files) if they
wish. i cant figure out a way to add the old files to the HtmlInputFile
collection. there seems to be no way to set the HtmlInputFile's textbox. is
there an alternative to HtmlInputFile that will accomplish what i need done?
suggestions welcome and thanks in advance.
Nov 17 '05 #1
1 2126
"Newbie" <Ne****@discuss ions.microsoft. com> wrote in message
news:32******** *************** ***********@mic rosoft.com...
there seems to be no way to set the HtmlInputFile's textbox.
Correct. Imagine the fun a hacker could have if there were... :-)
is there an alternative to HtmlInputFile that will accomplish what i need
done?


Loads - do a Google search...
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2950
by: R Reyes | last post by:
I am coding a forum and am having problems passing around the attachment file (as an HtmlInputFile) from page to page. Sometimes the users may want to preview their posts with the attachment specs (filesize, content-type, etc..) before submitting. i have tried storing it in a session like so: HtmlInputFile uploadFile = new HtmlInputFile(); Session = uploadFile.PostedFile; Then retrieving it, though I can't seem to figure out if the...
2
1969
by: Skwish | last post by:
Hi, I have a page with a htmlInputFile that is working fine. However, if I go to another page, and then go back to the page with the htmlInputFile, I get the following error Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.
2
1674
by: Augusto Cesar via DotNetMonster.com | last post by:
Hi, I want to customize the HtmlInputFile. I wanna something like an image button to play the "browse" button hole and hide the textbox. Is that possible? I also have tried to hide an HtmlInputFile in my page and added some javascript code to a button to fire the click() event of the HtmlInputFile. It worked for a moment, but when the submit button is clicked the HtmlInputFile looses its value. This solution was described in the...
0
939
by: ian | last post by:
Hello, I have a small test.aspx page with an HtmlInputFile class instance and an imagebutton. When I run this on our proxy server and click the save imagebutton I get the "Page cannot be displayed" error screen. I'm not sure how to fix this because it doesn't happen all the time. The weird thing is that if I make it a button instead of an image it works fine. OR if I delete the image (/images/save.jpg) then it works also. It doesn't...
3
4557
by: Dave Adler | last post by:
Is there any way to retain the value of an HtmlInputFile control through a postback? I do some server side validation on the page when it is submitted and if an error occurs on the page the HtmlInputFile control value is blank after the postback. The EnableViewState for the control is set to true. I can't put the postedFile.filename value in a hidden control and then put it back into the HtmlInputFile control on postback because the...
7
1620
by: cindy | last post by:
I have a System.Web.UI.HtmlControls.HtmlInputFile control that I use to submit files. Before the file is successfully submitted I validate another field on the form, it is the description of the file must be 500 characters. I am adding the file to a site server library programmatically so if the field is too long I want to return the user to the form with file still selected in the HtmlInputFile control. I am using an error label to inform...
1
1385
by: =?Utf-8?B?U3Jpbmk=?= | last post by:
Hi, Any one can help me out in this regard? The problem is: After selecting the file using HtmlInputFile Control(Browse option), how to set selected value(File path) between different postbacks? Because as we know we can't set the value properity as it is get properity. So if any hack is there please let me know. -- Thanks Srini.
2
1486
by: Zoliq | last post by:
Hi, I have a serious problem. I'm currently developing an application in which the user should upload many files (600-700 xml files). I've searched the web for a while and so far I realized that there's no way to use the HtmlInputFile class to achive the desired effect just because I can't set programatically the property of the class that stores the path of the selected file. My first approach was to write some javascript code which would...
2
1388
by: =?Utf-8?B?TmV0YWpp?= | last post by:
Hi Experts We are uploading files on the server using HtmlInputfile control with visual studio 2005, 2.0. In this there is an option for user to keep on uploading the files finally file actually uploaded on the server after clicking Upload Button. So when user add the file we store the content of HTMLInputfile control in session object. This overall functionality is working in visual studio 2002, 1.0 environment but the problem we are...
0
9405
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9841
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6655
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5280
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5424
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3930
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3533
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2807
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.