fileupload inside tab control

G

gremlin321

i have a tab control inside updatepanel and when trying to upload file i only
see that
fileupload.filename is empty. placing upload control outside tab control
with adding trigger works fine however. is there any way to get this to work
with the tab control?

here is a mockup of what i have
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="with_tab.aspx.cs"
Inherits="WebApplication2.with_tab" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"
tagprefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div style="height: 536px">


<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="conditional">

<ContentTemplate>
<cc1:TabContainer ID="TabContainer1" runat="server"
ActiveTabIndex="0"
Height="304px" Width="1150px" oninit="TabContainer1_Init">
<cc1:TabPanel ID="TabPanel1" runat="server"
HeaderText="TabPanel1" Height ="200">
<HeaderTemplate>
TabPanel1
</HeaderTemplate>

<ContentTemplate>
<br />
<br />
<asp:Button ID="Button1" runat="server"
onclick="Button1_Click1" Text="Update" Width=80 />
<br />
<br />
<asp:FileUpload ID="FileUpload1" runat="server"
Height="35px" Width="392px" />

<br />
</ContentTemplate>

</cc1:TabPanel>
</cc1:TabContainer>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
 
B

bruce barker

the tab is fine, the fileupload will not work inside an update panel
unless a full postback is done. so if a fileupload is rendered in the
update panel (tab picked), turn async postback off in the updatepanel.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top