 |
 | Rebuild the Page Member 4408548 | 9:38 23 Jul '09 |
|
 |
After adding the triggers it wasn't working for me. I right clicked on the .aspx page in the solution explorer and clicked "Build Page." That seemed to do the trick.
Thanks for the article!
|
|
|
|
 |
 | UpdateProgress Problem deepak_int | 19:42 19 Apr '09 |
|
 |
Using Postback trigger solves the problem of File upload control not working, but on the same page i m using UpdateProgress control, so when i use Postback trigger the UpdateProgress Panel does not show up.
Can anyone suggest
Warm regards Deepak Sharma Software Engineer
|
|
|
|
 |
|
 |
I also have this problem!!! Can anyone give hand??
|
|
|
|
 |
|
 |
I just found the article on FileUpload and PostBackTrigger -- I find myself with the same issue as above... the UpdateProgress isn't firing. Did I miss something? Did anyone address this yet?
|
|
|
|
 |
|
 |
Ok, if you are still interested here ya go...
I added this to the OnClientClick event of the button I use to fire upload.
<asp:Button ID="UploadButton" runat="server" Height="20px" Text="Upload" OnClientClick="javascript:document.getElementById('ctl00_ContentPlaceHolder1_ImageControl1_UpdateProgress').style.display='block';"/>
This portion of the code will change depending how where your controls are placed . Mine is a Web User Control dropped in the default page. "ctl00_ContentPlaceHolder1_ImageControl1_UpdateProgress"
|
|
|
|
 |
 | problem in file upload Shweta parikh | 23:53 19 Mar '09 |
|
 |
hi
in my application i m using a master page nd in page(which is using the master page)i m loading my ascx control.
in my ascx control i m using file upload control.
i have an update panel in my aspx page.
but when i debug my app i always get hasfile = false
i also tried to put another update panel in my ascx nd set triggers.
but now at this time when my control is loaded in aspx page i got an error a control with id btn2 could not be found.
i dont knw how to handle this.
can anyone help me?
thanx in advance.
shweta
|
|
|
|
 |
 | My vote of 1 danny_pow | 1:12 23 Jan '09 |
|
|
 |
 | Need Help.. ji_vijay | 19:05 29 Oct '08 |
|
 |
Hi,
I have not used any file upload control in my project. But i have used listbox inside the update panel. When i host my project into server i got this error..
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0
Pls anybody help me..
Thanks & Regards., VijayG
|
|
|
|
 |
|
 |
Please don't post unrelated questions.
http://forums.asp.net/[^]
Liam McLennan liam@eclipsewebsolutions.com.au www.eclipsewebsolutions.com.au
|
|
|
|
 |
 | Great Article Member 4461433 | 3:27 22 Oct '08 |
|
 |
Hi, thank you for your code, Worked first time for me! Cheers mate!
|
|
|
|
 |
 | Also important (at least UserControl) ph81 | 21:09 21 Oct '08 |
|
 |
sometimes solutions does not work unless u put Page.Form.Enctype = "multipart/form-data"; in UserControl Load function.
|
|
|
|
 |
|
 |
Great! I don't now what it is Page.Form.Enctype = "multipart/form-data"; but it works for me realy fine... 
|
|
|
|
 |
|
 |
THANKS! That did it for me in a situation with nested master pages surrounding the update panel! I was almost going nuts!
|
|
|
|
 |
 | So,where is ajax here? ab_dc | 4:39 11 Aug '08 |
|
 |
hello , it still do postback , how to upload without refresh all the page ?? thanks alot in advance.
|
|
|
|
 |
|
 |
THis article is about getting file upload to work in an MS ajax update panel. I don't know how to do an ajax upload. Maybe jquery can help?
Liam McLennan liam@eclipsewebsolutions.com.au www.eclipsewebsolutions.com.au
|
|
|
|
 |
|
|
 |
|
 |
The point here is that the FileUpload control itself will not function inside an Ajax panel without causing a full page postback. Therefore, AJAX does not apply to the File Upload control itself. It's for the other controls on the page.
Further reading, however, reveals that this is a limitation of javascript moreso than a limitation of .NET. According to ajaxf1.com[^], it's a security limitation. They recommend the "iframe" strategy (include an iframe of the upload target), which does work. Personally, I try to steer away from iframe's when possible.
|
|
|
|
 |
 | File Upload HendrikO | 2:12 17 Jun '08 |
|
|
 |
 | Update Panel Propblems. Hasan Mohiuddin Farooqi | 21:06 18 May '08 |
|
 |
Hi Frnds,
I am facing some update panel problems while using a treeview control.
1) I set the expandDepth=1, and when the inner node is clicked entire tree is getting collapsed. 2) Giving PopulateOnDemand can not be set to true when then node is already set populateOnDemand to true. (This is becoz the child items r getting populated dynamically at runtime on click of node).
3) I have a download button in update panel when i clicked it, the exception Message is
"Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near 'Fixes in PL/SQL Deve'."
Generally v use Response.WriteFile or TransmitFile while downloading a file, The exception is here only..
Is there any property of update panel to be set to keep working with treeview or the update panel w'll not supported for treeview control?
And also any alternative for downloading the file from within updatepanel?
All the suggessions and solutions are appreciated and valueable to me.
Thands in advance. Regards Hasan.
|
|
|
|
 |
 | What about a file upload control inside an ASCX user control inside an update panel frankkirchner | 14:21 1 May '08 |
|
 |
Liam McLennan's excellent article on how to set a postback trigger for the fileupload control in the update panel works great, unless the file upload control happens to be inside a user control that is inside of the update panel. There is no way to set the trigger to the control in the ascx file!
Any ideas?
|
|
|
|
 |
|
 |
When specifying the control id for the postback trigger use the following syntax usercontrolname:fileuploadcontrolname
Liam McLennan liam@eclipsewebsolutions.com.au www.eclipsewebsolutions.com.au
|
|
|
|
 |
|
 |
Hmm i like it, but it did not work. Now, the 'usercontrol name' I think is 'Utils1' the ascx control istself is called Utils.ascx, and i make reference to it as such as Utils1 in other code behind like that. Here is the reference: <%@ Register Src="Utils.ascx" TagName="Utils" TagPrefix="uc3" %>
I tried 'Utils', Utils1' and 'uc3' they all give the same thing.
A control with ID 'Utils1:FileUpload1' could not be found for the trigger in UpdatePanel 'UpdatePanel1'.
|
|
|
|
 |
|
 |
To assign the postback trigger from within a user control, you can use the code-behind to reference the parent page and make the trigger. Here's how:
On your parent page, you have the following code somewhere in the page which includes your scriptmanager, updatepanel, and user control that has a file upload in it:
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate>
<MyUserControls:MyControl id="usrMyUploadControl" runat="server" ScriptManagerName="ScriptManager1" /> <!---->
</ContentTemplate> </asp:UpdatePanel>
Now, in your user control, you will have the following code which will search for the ScriptManager in the page's collection of nested controls. Then it will register the postback trigger from within your user control. This is how we can reference the user control's upload button, which in this case is called btnUpload.
public string ScriptManagerName = "";
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e);
if (ScriptManagerName.Length > 0) { ScriptManager scriptManager = (ScriptManager)SearchControl(Page, ScriptManagerName); if (scriptManager != null) { scriptManager.RegisterPostBackControl(btnUpload); } } }
public Control SearchControl(Control container, string id) { Control control = container.FindControl(id); if (control == null) { foreach (Control c in container.Controls) { if (c.HasControls()) { control = SearchControl(c, id); if (control != null) break; } } } return control; }
|
|
|
|
 |
|
 |
Guys,
Another thing to remember, is that if the upload control is not visible on load, the enctype of the form will never be set to 'multipart/form-data' without which this all will not work. So in the control, in which ever event handler reveals the upload control:
ScriptManager SM = (ScriptManager)Page.Master.FindControl("uxScriptManager"); SM.RegisterPostBackControl(btnAddIssue);
And in the parent page, or where ever the form is defined:
if (!this.IsPostBack) { this.Page.Form.Enctype = "multipart/form-data"; }
Happy coding!
Aikiken
|
|
|
|
 |
|
 |
Hi
Great work guys! This and SearchControl solved my problem off dynamically generated user control in master/content/usercontrol site. Thank you alot!
aikipoodle wrote: if (!this.IsPostBack) { this.Page.Form.Enctype = "multipart/form-data"; }
/Liam Rr.
|
|
|
|
 |