473,545 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
+ 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 ModalPopUpExten der 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.Post edFile.Filename to NULL, and causes an
error (object reference...).

Any ideas ?

Thx.

Mar 29 '07 #1
2 7987
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 ModalPopUpExten der 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.Post edFile.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
11189
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 this case), and the Button2 linkbutton perform redirect to another page. When I click on Button2 it returns a new page content as the result of the...
2
2798
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 it. In the updatepanel is an ASP.NET image button that does a postback. So, it looks like this: aspx.updatepanel.Add(LoadControl(ascx...
1
2162
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 correctly so that it did not do a postback. But when I walked through the execution process, it in fact does cause a postback when the "expand"...
2
15049
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 been able to find the cause of the problem, and will describe it here first textually and then through a code example. The purpose of what I am...
2
5201
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 ? These should be complete page postbacks not partial postbacks, because the postback in question is not triggerred by a control inside the UpdatePanel...
1
8194
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 behaviour: it's a webform with some VB code-behind, you shoud create a new AJAX-enabled application and past the following code. (DEFAULT.ASPX) ...
5
12566
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 to the updatepanel, but the problem is, I have an update panel inside a web usercontrol, and the usercontrol is sitting inside an updatepanel on the...
2
1809
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 postback is an asynch one. Is the framework optimizing the rendering process on asynch postback? How does the __doPostBack() is working whenever...
3
3824
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 DropDownList1 using the ScriptManager SetFocus method. Use the Visual Studio debugger. Set a breakpoint on in the (!IsPostBack) part of the PageLoad...
0
7457
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...
0
7391
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...
1
7410
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...
0
7746
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...
0
5962
agi2029
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 project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3438
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1869
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
1
1010
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
693
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...

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.