Hi,
The error message "File Browsing has been blocked." always appear when I set property InsertButtonID to, for example Button1 and I colling method Button1.click() from another button for example Button2.
I do this in this way becouse I want that AjaxUploaderQueueTable show under button1 and the uploader button (button3) was in another location.
May be someone from CuteSoft have better solution.
I just want to find a way to set position of AjaxUploaderQueueTable or just turn it off.
I work on Win7 x86, VS2008 , flash10, IIS7.
Below I paste sample code.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
<!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></title>
<script runat="server">
void InsertMsg(string msg)
{
ListBoxEvents.Items.Insert(0, msg);
ListBoxEvents.SelectedIndex = 0;
}
void Uploader_FileUploaded(object sender, UploaderEventArgs args)
{
InsertMsg("File uploaded! " + args.FileName + ", " + args.FileSize + " bytes.");
//Copys the uploaded file to a new location.
//args.CopyTo("c:\\temp\\"+args.FileName);
//You can also open the uploaded file's data stream.
//System.IO.Stream data = args.OpenStream();
}
</script>
<style type="text/css">
#OpenFileUpload
{
height: 28px;
width: 395px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>
<DIV id = "HiddenDivOpen" style=" Z-INDEX: 5000; left: 530px; top: 86px; height: 293px; width:508px; overflow:auto; POSITION: absolute;" >
<INPUT id="HiddenButtonOpen" style="Z-INDEX: 101; LEFT: 96px;TOP: 0px; HEIGHT: 24px; width: 501px"
type="button" name="Button2" runat="server"
value="Hiddenn button - I want that AjaxUploaderQueueTable show under this button ">
</DIV>
<input ID="OpenFileUpload" runat="server" onclick="HiddenButtonOpen.click()" style="position: absolute; top: 11px; left: 17px;" type="button"
value="I want that Upload button was here" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div id="divUploder" style="POSITION: absolute; top: 200px;">
<h2>
Selecting multiple files for upload
</h2>
<p>
Select multiple files in the file browser dialog then upload them at once</p>
<CuteWebUI:Uploader runat="server" ID="Uploader1" InsertText="Upload Multiple Files (Max 10M)"
MultipleFilesUpload="true" OnFileUploaded="Uploader_FileUploaded" InsertButtonID="HiddenButtonOpen"
>
<ValidateOption MaxSizeKB="10240" />
</CuteWebUI:Uploader>
<br />
<br />
<div>
Server Trace:
<br />
<asp:ListBox runat="server" ID="ListBoxEvents" Width="400"></asp:ListBox>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>