Home Posts Topics Members FAQ
Brad
The following code work on my pc (win2003 server) but does not work when
deployed to a server (win2000 server).
For count As Integer = 1 To 4
Dim input As New HtmlInputFile
input = CType(Me.FindCo ntrol("File" & count.ToString) , HtmlInputFile)
Next count
I have four htmlinputfile controls, for upload files, on one form. As the
code shows I interiate throw the controls. On the server it bombs on the
first iteration with the error "Object reference not set to an instance of
an object" because it cannot find any of the controls. Obvious question
is.....why?
Yes, I have them set to run at server. Yes I have the controls defined in
the code behind. If I access each of the file controls specifically by name
I have no problem...only when using FindControl.
Brad
Nov 19 '05 #1
Subscribe Reply
1 1600
Brad
Never mind.....found the problem.
"Brad" <no****@co.lane .or.us> wrote in message
news:eA******** ******@tk2msftn gp13.phx.gbl...
The following code work on my pc (win2003 server) but does not work when
deployed to a server (win2000 server).For count As Integer = 1 To 4
Dim input As New HtmlInputFile
input = CType(Me.FindCo ntrol("File" & count.ToString) , HtmlInputFile)
Next count
I have four htmlinputfile controls, for upload files, on one form. As the
code shows I interiate throw the controls. On the server it bombs on the
first iteration with the error "Object reference not set to an instance of
an object" because it cannot find any of the controls. Obvious question
is.....why?
Yes, I have them set to run at server. Yes I have the controls defined in
the code behind. If I access each of the file controls specifically byname I have no problem...only when using FindControl.
Brad
Nov 19 '05 #2
This thread has been closed and replies have been disabled. Please start a new discussion.
Similar topics
4 2944 pass HtmlInputFile from page to page - impossible? 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();... C# / C Sharp |
1 2117 Problem with HtmlInputFile by: Newbie |last post by: i have a c# asp.net webform that has an HtmlInputFile and a listbox (to hold the filenames to be uploaded). but HtmlInputFile.PostedFile and HtmlInputFile.Value 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... C# / C Sharp |
2 1953 htmlInputFile 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,... ASP.NET |
5 2888 HtmlInputFile control looses information after post back. by: shimonsim |last post by: Hi, I need to upload pictures from client machine and I am using HtmlInputFile control I set validator to make sure that file has correct expention but if one of the files has incorrect extention all information in other controls gets lost. I can't find the way to save pathes and then assign them to control - the Value property is read only .... ASP.NET |
5 3587 HtmlInputFile to get filename only without upload by: Ariel Dolan |last post by: Can I use HtmlInputFile to only get the selected file name but not actually upload the file? Clicking the control's Browse button let's the user select a file. All I need is the HtmlInputFile Value property. However, any button clicked on the Html page results in uploading the selected file. Is there a way to avoid the actual uploading? ... ASP.NET |
5 3100 Uploading File w/o HtmlInputFile control by: Grant Harmeyer |last post by: I have an application that uses FreeTextBox 2.0 (http://www.freetextbox.com). FreeTextBox is a rich text editor that behaves similarly to MS Word. The FreeTextBox control has a button to insert images (just as you would with MS Word) and it works beautifully. The problem is that when you include an image with the rich text editor, the image... ASP.NET |
2 1664 Custom HtmlInputFile 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... ASP.NET |
3 4727 HTMLInputFile not settable by: UJ |last post by: Guys, I know this isn't the appropriate place to post this because it's HTML not ASP.Net but I need some guidance. I have a web page with an HTMLInputFile on it. The person enters the stuff, that's all great. They go to the next page and I allow them to click a button to go back a page to change values. When I go back one page, I want the... ASP.NET |
7 1748 Is it possible ot sub class the HtmlInputFile control? by: Buddy Ackerman |last post by: I created this class Public Class HTMLFileInput : Inherits System.Web.UI.HtmlControls.HtmlInputFile Public Property Data As String Get Return ViewState("HTMLFileInput.Data") End Get Set (ByVal Value As String) ASP.NET |
3 4546 How to Persist HtmlInputFile Value through postback? 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... Visual Basic .NET |
7465
What is ONU? by: marktang |last post by: ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main... General |
7398 Changing the language in Windows 10 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... Windows Server |
7656
Problem With Comparison Operator <=> in G++ 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. ... C / C++ |
7805
Maximizing Business Potential: The Nexus of Website Design and Digital Marketing by: jinu1996 |last post by: In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that... Online Marketing |
5969
AI Job Threat for Devs by: agi2029 |last post by: Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then... Career Advice |
1 5325
Access Europe - Using VBA to create a class based on a table - Wed 1 May by: isladogs |last post by: The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes... Microsoft Access / VBA |
3441 Windows Forms - .Net 8.0 by: adsilva |last post by: A Windows Forms form does not have the event Unload, like VB6. What one acts like? Visual Basic .NET |
1 1878 transfer the data from one system to another through ip address 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 C# / C Sharp |
1 1013
How to add payments to a PHP MySQL app. by: muto222 |last post by: How can i add a mobile payment intergratation into php mysql website. PHP |
By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.
To disable or enable advertisem*nts and analytics tracking please visit the page.