473,698 Members | 2,203 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

fileupload control problem using an imagebutton on top of it

111 New Member
I am using updatepanel in my application and fileupload control...there is no way to customize the look and feel of the fileupload control so what i have done is kept an image on top of the browse button of the fileupload control.

And when the user clicks on the imagebutton which will be exactly like a browse button, i raise the fileupload click event by javascript.

Like fileupload1.cli ck();

When i use this, when i click on the submit button of the form...it doesnot postback to the server, simply it executes the clientside script and goes dead....if i remove this image button, the same code works perfectly....?


Did any one of you faced the same kind of problem....plea se its urgent...help me............. ......


thanks in advance....

Combination is like
Updatepanel, FileUpload, Image on top of FileUpload..... problem is with the image click event raising the fileupload button click...
Apr 25 '10 #1
3 2375
Frinavale
9,735 Recognized Expert Moderator Expert
Bharathreddy,

The FileUpload control is not supported in UpdatePanels. It will appear to work (the page will submit to the server and everything) but you will never be able to get the file (it will always be null/nothing).

FileUpload controls require full page postbacks.

-Frinny
Apr 27 '10 #2
bharathreddy
111 New Member
@Frinavale
Hi Frinny,

Thankyou so much for the response. My problem is like, I am using a complete postback, its working good and the file is also being uploaded to ftp server, but my problem is:

If I normally keep the fileupload control with out any styles its working good.

But if I keep an image on top of the fileupload control which looks like a browse button, and on this image click i am firing the fileupload browse click to select the file. So far so good its works as expected. But when I try to click another button called submit, to submit the form, this button is not able to postback the page....i mean its button click event is not working....

If I remove the image on top of browse button its working fine.....

Thanks
Bharath VasiReddy
Apr 27 '10 #3
Frinavale
9,735 Recognized Expert Moderator Expert
Sounds like a job for FireBug :)
You need to figure out which control is over top of your submit button.
It's probably has a visible:false style...but it's still there hovering over the submit button.
Apr 27 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
1839
by: Uncle Ben | last post by:
How strong and reliable is the new ASP.NET 2.0 FileUpload control? By that, I mean is it reliable enough to accept 2-gigabyte file uploads per upload session? Also, is it possible or easy to implement an upload progress bar using this FileUpload control? Thanks.
4
3023
by: Jordan | last post by:
I need to dynamically add an ImageButton control to a user control and and do some server-side processing when the user clicks it. While I the ImageButton is added to the user control at runtime, as needed, I'm having trouble wiring up its click event procedure. The problem is that when I go to subscribe the ImageButton to the delegate, the ImageButton is <undefined> (i.e., throws the "object not found" exception). Note that I'm using...
1
7037
by: Marko Vuksanovic | last post by:
I am trying to implement an upload progress indicator using atlas, using the following workaround: http://forums.asp.net/thread/1321664.aspx This is the code in FileUpload.apsx file is as follows: <html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server"> <title> drag </title> </head> <body> <form id="f1" enctype="multipart/form-data" runat="server">
12
15662
by: Phil Z. | last post by:
After migrating an ASP.NET 1.1 application to 2.0 we were getting "Cannot access a closed file" errors when uploading. I found a number of post on the subject and have since moved from using an Html File Input control to using the new FileUpload control. Previously, I had set the maxRequestLength attribute in the machine.config file to allow 100MB uploads with success. In the v2.0 application I have added an httpRuntime node to the...
4
5670
by: Dave | last post by:
If you had a FileUpload control inside of a FormView...how would you use FindControl to access the FileUpload properties? Let me just say that (FileUpload)FormView1.FindControl(FileUpload1).FileName doesn't work. The purpose is to insert a graphic in the InsertItemTemplate section of the form. I'm using the expample that's in the online help for the post back. protected void Page_Load(object sender, EventArgs e)
3
5172
by: rn5a | last post by:
The ASPX FileUpload control displays a TextBox along with a 'Browse...' Button. Setting the different properties of this control just reflects the changes in the TextBox but not the Button. For e.g. if the BackColor of a FileUpload control is set to blue, then only the TextBox color changes to blue but the BackColor of the Button doesn't change to blue. Or if the Font-Size of a FileUpload control is set to 15pt, then only the size of the...
2
2235
by: Toni | last post by:
I have ImageButton array. I have defined onClick event and it works. But in this function I can not use control propetries. I want to use index of ImageButton which is clicked and ImageURL property. How to use this? protected void Page_Load(object sender, EventArgs e) { ImageButton HeaderImage = new ImageButton; for (int n = 1; n < 6; n++) {
5
12082
by: =?Utf-8?B?QmVydA==?= | last post by:
Hi How can you set the filename property in the asp:fileupload control? How can you persist the value of the chosen filename between postbacks? thanks B
2
6001
by: =?Utf-8?B?UGF1bA==?= | last post by:
I have a gridview with 2 columns. One column is a BoundColumn to a part number (string). One column is an ItemTemplate with a FileUpload control. There can be multiple rows (i.e. part numbers) in the gridview. The user attaches a file for each part number / row. The user clicks a button after attaching all the needed files.
3
2421
by: skcsknathan001 | last post by:
I have 2 projects, and accessing a custom control , fron another project. Inside the custom control, it calls a function It compiles and when it runs I get a NullReference error message on the function which accepts the ImageButton. Basically custom control is called .. goes into execute functions, but the ImageButton control inside the custom control is not passed to the function. I'm thinking is it some permission blocking the visibility...
0
8672
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
9156
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
8860
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
6518
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
5860
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
4361
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
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2323
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1998
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.