473,770 Members | 6,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Upload file object Problem in Repeater

I have the following object that uploads files:

<input id="MyFile" style="width:10 0px" type="File"
onClick="Upload File" runat="Server">

in my Repeater control. And it doesn't seem to work.

I need to save the file automatically when the file is uploaded. Normally,
you would have an Upload button to do this, but I need it to do it right
away.

I added the onClick property, but as soon as I put my mouse in the textbox,
I get a popup that says there is UploadFile is undefined. But it is there.

I assume that it thinks there is a Javascript procedure (which there isn't).

Is there a way to make this work correctly?

Thanks,

Tom
Nov 19 '05 #1
2 1660
the onclick is a client side event, thus the scripting error.

-- bruce (sqlwork.com)

"tshad" <ts**********@f tsolutions.com> wrote in message
news:e0******** ******@tk2msftn gp13.phx.gbl...
I have the following object that uploads files:

<input id="MyFile" style="width:10 0px" type="File"
onClick="Upload File" runat="Server">

in my Repeater control. And it doesn't seem to work.

I need to save the file automatically when the file is uploaded.
Normally, you would have an Upload button to do this, but I need it to do
it right away.

I added the onClick property, but as soon as I put my mouse in the
textbox, I get a popup that says there is UploadFile is undefined. But it
is there.

I assume that it thinks there is a Javascript procedure (which there
isn't).

Is there a way to make this work correctly?

Thanks,

Tom

Nov 19 '05 #2

"Bruce Barker" <br************ ******@safeco.c om> wrote in message
news:uf******** ******@TK2MSFTN GP10.phx.gbl...
the onclick is a client side event, thus the scripting error.
That was what I figured.

All the examples of setting up the upload object, necessitate 2 steps,
pressing the browse button and then an Upload button to actually upload the
file.

I was trying to find a way to do it with one step (hitting the browse button
would get the file and upload it).

Thanks,

Tom

-- bruce (sqlwork.com)

"tshad" <ts**********@f tsolutions.com> wrote in message
news:e0******** ******@tk2msftn gp13.phx.gbl...
I have the following object that uploads files:

<input id="MyFile" style="width:10 0px" type="File"
onClick="Upload File" runat="Server">

in my Repeater control. And it doesn't seem to work.

I need to save the file automatically when the file is uploaded.
Normally, you would have an Upload button to do this, but I need it to do
it right away.

I added the onClick property, but as soon as I put my mouse in the
textbox, I get a popup that says there is UploadFile is undefined. But
it is there.

I assume that it thinks there is a Javascript procedure (which there
isn't).

Is there a way to make this work correctly?

Thanks,

Tom


Nov 19 '05 #3

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

Similar topics

3
11763
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a table in MySQL with the path & filename to the image. I have successfully uploaded and performed an update query on the database, but the problem I have is I cannot retain the primary key field in a variable which is then used in a SQL update...
9
10154
by: Ric | last post by:
im new to asp.net. please help if u can. is it possible to refer to a control(ie lable, placeholder, textbox) that is inside a repeater object from a code behind file? when i place the control object outside of the repeater, i can refer to it from the code behind file. when i place the control object inside the repeater, i get a 'need to instanciate the control object' error. if i declare the control object inside the control behind file,...
10
3087
by: Brian Henry | last post by:
Hi, I am having a problem with an attachment system I made... it works with files up to ~3MB in size then after that if you try to upload a file it just goes to a "Page can not be displayed" page like it tried to do it but errored... I thought changeing the max size for the file input box to about 100mb would fix it but nope here is my page code and my code behind code... ===============
2
6063
by: Tom Wells | last post by:
I have a little file upload page that I have been able to use to successfully upload files to the C: drive of LocalHost (my machine). I need to be able to upload to a network drive from the intranet server. On the line: dirs = Directory.GetDirectories(currentDir) I get "Access to the path "\\les-net\les\Special Projects\ATSPDF" is denied." How do I get the GetDirectories command to user my user ID and password when it tries to hit the...
2
1510
by: Alan Silver | last post by:
Hello, I am just trying out reading an XML file in an ASP.NET page, but am having a little trouble. I'm sure this is something really obvious and dumb, but I can't see what ... I have an XML file that contains some site map info (see further down), and I have written a page to read this in and display the contents. I put it into a datagrid and also use a repeater (the former was a quick way of seeing what happened, the latter was in...
15
5363
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the path of the uploaded image, and resize it with the provided dimensions. My function is below. The current function is returning an error when run from the upload function: A generic error occurred in GDI+. Not sure what exactly that means. From what...
9
3838
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web site for a small club I belong to and one of the features I would like to include is the ability to allow users to upload image files. unfortunately the servers web root www folder only allows READ and EXECUTE permissions, which makes it...
1
2141
by: Marko Vuksanovic | last post by:
I used the following code for implementing a file upload progress indicator, using UpdateProgress Panel, though I have a problem that FileUpload.Has File always returns false. Any suggestions what might be wrong? FileUpload2.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="FileUpload2.aspx.cs" Inherits="FileUpload2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
21
34438
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most obvious of which is the sharing of files. For example, you upload images to a server to share them with other people over the Internet. Perl comes ready equipped for uploading files via the CGI.pm module, which has long been a core module and allows users...
0
9592
marktang
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
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,...
1
10004
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9870
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...
1
7416
isladogs
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6678
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
5313
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...
2
3576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2817
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.