Hi paulg,
You can set TempDirectory by the code below
- <%@ Page Language="C#" %>
-
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
- <script runat="server">
- protected override void OnInit(EventArgs e)
- {
- base.OnInit(e);
- Uploader1.TempDirectory = "~/temp/u2/";
- }
-
- void InsertMsg(string msg)
- {
- ListBoxEvents.Items.Insert(0, msg);
- ListBoxEvents.SelectedIndex = 0;
- }
- void Uploader_FileUploaded(object sender, UploaderEventArgs args)
- {
- Uploader uploader = (Uploader)sender;
- InsertMsg("File uploaded! " + args.FileName + ", " + args.FileSize + " bytes.");
-
-
-
-
-
- }
- </script>
-
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title>Simple Upload</title>
- <link rel="stylesheet" href="demo.css" type="text/css" />
- </head>
- <body>
- <form id="form1" runat="server">
- <div class="content">
- <h2>
- Simple Upload (Customizing the UI)
- </h2>
- <p>
- A sample demonstrating how to customize the look and feel of file upload controls.
- (Maximum file size: 10M).
- </p>
- <asp:Image runat="server" ID="Uploader1Insert" AlternateText="Upload File" ImageUrl="~/sampleimages/upload.png" />
- <asp:Panel runat="server" ID="Uploader1Progress" BorderColor="Orange" BorderStyle="dashed"
- BorderWidth="2" Style="padding-right: 4px; padding-left: 4px; padding-bottom: 4px;
- padding-top: 4px">
- <asp:Label ID="Uploader1ProgressText" runat="server" ForeColor="Firebrick"></asp:Label>
- </asp:Panel>
- <asp:Image runat="server" ID="Uploader1Cancel" AlternateText="Cancel" ImageUrl="~/sampleimages/cancel_button.gif" />
- <CuteWebUI:Uploader runat="server" ID="Uploader1" InsertButtonID='Uploader1Insert'
- ProgressCtrlID='Uploader1Progress' ProgressTextID='Uploader1ProgressText' CancelButtonID='Uploader1Cancel'
- OnFileUploaded="Uploader_FileUploaded">
- <ValidateOption MaxSizeKB="10240" />
- </CuteWebUI:Uploader>
- <br />
- <br />
- <div>
- Server Trace:
- <br>
- <br>
- <asp:ListBox runat="server" ID="ListBoxEvents" Width="400"></asp:ListBox>
- </div>
- </div>
- </form>
- </body>
- </html>
Hope it helps.
Regards,
Jeff