HOW: Uploader in invisible panel

Feb 5, 2009 at 9:39 AM

I don't know how this works...

I have 2 update panels. The second one has an invisible panel and inside that panel is the FileUploader.
I show the invisiblre pnael when I press a button.
I'm getting always the message "Please install adobe flash player"

This is the code:


<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>



asp:UpdatePanel ID="UpdatePanel1" runat="server">






<asp:Panel ID="panel1" runat="server" Visible="true">



<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine"></asp:TextBox>



<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />













<asp:UpdatePanel ID="UpdatePanel2" runat="server">






<asp:Panel ID="panel2" runat="server" Visible="false">




<asp:TextBox ID="Text1" runat="server"></asp:TextBox>



<fjx:FileUploader ID="FileUploader1" runat="server" UseInsideUpdatePanel="true" MaxFileSize="1MB" MaxFileQueueSize="4MB" AllowedFileTypes="Im genes (jpg, gif):*.jpg;*.jpeg;*.gif">






<fjx:FileSaverAdapter FolderName="Files" OnFileNameDetermining="FileNameDetermining" />



--<fjx:ThumbGeneratorAdapter FolderName="Files" Suffix="_thumb" MaximumWidth="200" MaximumHeight="200" /> --%>

















Code behind:



protected void Button1_Click(object sender, EventArgs e)



panel1.Visible =



panel2.Visible =





Feb 5, 2009 at 3:51 PM
Its a little bit more complicated if it is invisible and may require you to write some client side code. The basics are here:

If on the other hand you have a custom client side logic that makes the parent of the uploader invisible or reloads that parent. You can do this:

<script type="text/JavaScript">
// initialize on the page load

// function called BEFORE ParentDiv is reloaded
function BeforeReload(){

// function called AFTER ParentDiv is reloaded
function AfterReload(){
<div id="ParentDiv">
  <fjx:FileUploader ID="FileUploader1" JsFunc_Init="InitUploader" JsFunc_Dispose="DisposeUploader" runat="server">
          <fjx:FileSaverAdapter Runat="server" FolderName="UploadFolder" />
Feb 5, 2009 at 7:37 PM

Sorry for asking but I'm new with this.

Could you make a complete example, because I'm pretty lost....thanks
Feb 6, 2009 at 4:16 PM
Sorry Juanster I am affraid I won't have time these days to go through your code and modify it. Try to make it yourself starting with the exampole I posted. This is a great chance for you to learn to combine client side and server side code in general.