473,473 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

UpdatePanel Postback - How to make it work ?

I have a form with ALL my controls on an updatepanel, but theres one
giving me a hard time, its an asp:FileUpload control.
All I want to do is:
- Click on a LinkButton <- WORKS
- Open a ModalPopUpExtender with the FileUpload <- WORKS
- Select the file and click on another LinkButton to close the
ModalPopUp <- WORKS
- Click on SEND and send the file. <- ERROR HERE

I can make it work perfectly without the UpdatePanel, or if I set the
UpdatePanel to PostBack when I Click on SEND.
However I want it to work with no postbacks, but seems like its not
possible.
I guess the problem is when the UpdatePanel does its AsyncPostBack,
it sets the FileUpload.PostedFile.Filename to NULL, and causes an
error (object reference...).

Any ideas ?

Thx.

Mar 29 '07 #1
2 7983
the update panel does not support fileupload.

the update panel uses ajax to send the value of controls to the server,
the server then produces the html and sends it back. the update panel
then display the html.

the fileupload uses the browser to do a mutipart mime type to send the
filedata. browser security prevents javascript setting the name.

you could host an iframe with a fileupload that posted back.

-- bruce (sqlwork.com)


Jl_G_0 wrote:
I have a form with ALL my controls on an updatepanel, but theres one
giving me a hard time, its an asp:FileUpload control.
All I want to do is:
- Click on a LinkButton <- WORKS
- Open a ModalPopUpExtender with the FileUpload <- WORKS
- Select the file and click on another LinkButton to close the
ModalPopUp <- WORKS
- Click on SEND and send the file. <- ERROR HERE

I can make it work perfectly without the UpdatePanel, or if I set the
UpdatePanel to PostBack when I Click on SEND.
However I want it to work with no postbacks, but seems like its not
possible.
I guess the problem is when the UpdatePanel does its AsyncPostBack,
it sets the FileUpload.PostedFile.Filename to NULL, and causes an
error (object reference...).

Any ideas ?

Thx.
Mar 29 '07 #2
thanks for answering me.

well, I guess I can try the Iframe then... everything to avoid the
postback...
Mar 30 '07 #3

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

Similar topics

2
by: marss | last post by:
Hello, I have a question concerning UpdatePanel. For example, I have two linkbuttons at the UpdatePanel. I want the Button1 linkbutton to update controls within panel (the TextBox1 control in...
2
by: brett | last post by:
I have an AJAX updatepanel in an aspx page. Inside the updatepanel is a placeholder control, which loads various ascx files. This all works fine. One of the ascx files also has an updatepanel in...
1
by: jobo | last post by:
I have a news section of the website contained within the updatepanel. What I want is that when a news summary is clicked, the news item opens up in that same box. I thought I wired everything up...
2
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have...
2
by: John Grandy | last post by:
Is anyone finding that cookies added to the Response.Cookies collection within pages which contain an UpdatePanel do not exist in the Request.Cookies collection when the page is posted back ? ...
1
by: abellix | last post by:
An updatepanel contains a datagrid, this datagrid has columns generated by code-behind: some columns should have async postback, others should have sync postback. Here a sample to reproduce the...
5
by: Leon Mayne | last post by:
Having a bit of trouble here. I know that if you want to use a fileupload control inside an AJAX update panel then you need to create a trigger for the control that performs the uploading postback...
2
by: Mike Gleason jr Couturier | last post by:
Hi guys, I know that the page is reconstructed every time whenever an asynch postback is occuring... I've put a breakpoint in the page render method and the function still gets called when the...
3
by: =?Utf-8?B?Y21lZWsxXzE5OTk=?= | last post by:
Hello, On a webpage, create an UpdatePanel with two DropDownLists. Set AutoPostBack of DropDownList1 to true. In the SelectedIndexChanged method, refill DropDownList2 and set the focus to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
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...
1
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...
1
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.