Found odd workaround for FormView inside of UpdatePanel, here is the method
with the Datasource omitted:
They key to it working appears to be having the "New" Button on the Item
Template with the same Trigger ID as the
"Attach Uploaded File" Button on the Insert Template, along with the 3rd
Transparent Button outside of the FormView.
It seems to expose the AttachButton ID as a submit Button to act as a
Trigger for the PostBack within
the FormView & UpdatePanel; anyway it works, even inside of a MasterPage.
Any thought's welcome to my better understanding this are welcome?
Thanks
John
<html xmlns="
http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="FormView2_AttachButton" />
</Triggers>
<ContentTemplate>
<asp:FormView ID="FormView2" runat="server" DataKeyNames="KeyID"
DataSourceID="SqlDataSourceAdd" Width="775px" >
<EditItemTemplate>
</EditItemTemplate>
<InsertItemTemplate>
<asp:Button ID="AttachButton" runat="server" CausesValidation="False"
OnClick="Button1_Click"
Text="Attach Uploaded File" />
<asp:FileUpload ID="FileUpload1" runat="server" Width="500px" />
</InsertItemTemplate>
<ItemTemplate>
<asp:Button ID="AttachButton" runat="server"
CommandName="New" Text="New" Width="75px" />
</ItemTemplate>
</asp:FormView>
<asp:Button ID="FormView2_AttachButton" runat="server"
BackColor="Transparent" BorderColor="Transparent" BorderStyle="None"
Enabled="False" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
[quoted text, click to view] ""Walter Wang [MSFT]"" <wawang@online.microsoft.com> wrote in message
news:iZCfkBhFIHA.5176@TK2MSFTNGHUB02.phx.gbl...
> Hi John,
>
> FileUpload is not compatible with UpdatePanel:
>
> #ASP.NET AJAX > Overview > The UpdatePanel and UpdateProgress Controls >
> UpdatePanel Control Overview
>
http://www.asp.net/ajax/documentation/live/overview/UpdatePanelOverview.aspx > <quote>
> Controls that Are Not Compatible with UpdatePanel Controls
>
> The following ASP.NET controls are not compatible with partial-page
> updates, and are therefore not supported inside an UpdatePanel control:
>
> TreeView and Menu controls.
>
> Web Parts controls. For more information, see ASP.NET Web Parts Controls.
>
> FileUpload controls when they are used to upload files as part of an
> asynchronous postback.
> </quote>
>
> Regards,
> Walter Wang (wawang@online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
>
> ==================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>