protected void Page_Load(object sender, EventArgs e) { // Set the default processor FileSystemProcessor fs = new FileSystemProcessor(); fs.OutputPath = Server.MapPath(this.OutputPath); DJUploadController1.DefaultFileProcessor = fs; }
protected void Page_Load(object sender, EventArgs e) { //Wis.Toolkit.WebControls.DropdownMenus.DropdownMenuItem item; //item = new Wis.Toolkit.WebControls.DropdownMenus.DropdownMenuItem(); //item.Text = "1"; //DropdownMenu1.MenuItems.Add(item); //Wis.Toolkit.ClientScript.MessageBox mb = new Wis.Toolkit.ClientScript.MessageBox(this.Page, "呵呵", "出现错误"); //mb.Call(); //((Wis.Toolkit.SiteMapDataProvider)SiteMap.Provider).Stack(category.CategoryName, string.Format("ArticleList.aspx?CategoryGuid={0}", category.CategoryGuid)); List<KeyValuePair<string, Uri>> nodes = new List<KeyValuePair<string, Uri>>(); nodes.Add(new KeyValuePair<string, Uri>("Dynamic Content", new Uri(Request.Url, "Default.aspx?id="))); nodes.Add(new KeyValuePair<string, Uri>(Request["id"], Request.Url)); ((Wis.Toolkit.SiteMapDataProvider)SiteMap.Provider).Stack(nodes); MiniPager1.RecordCount = 1000; MiniPager1.PageIndex = 10; MiniPager1.PageSize = 20; MiniPager1.UrlPattern = Request.Path + "?PageIndex={0}"; // Set the default processor FileSystemProcessor fs = new FileSystemProcessor(); fs.OutputPath = Server.MapPath("~/Uploads/default"); DJUploadController1.DefaultFileProcessor = fs; }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void Page_Load(object sender, EventArgs e) { this.OutputPath = Server.MapPath("~/Uploads/Photos/"); // Set the default processor FileSystemProcessor fs = new FileSystemProcessor(); fs.OutputPath = Server.MapPath("~/Uploads/Default"); DJUploadController1.DefaultFileProcessor = fs; // Change the file processor and set it's properties. FieldTestProcessor fsd = new FieldTestProcessor(); fsd.OutputPath = this.OutputPath + System.DateTime.Now.ToShortDateString() + "/"; DJFileUpload1.FileProcessor = fsd; // 读取目录 ~/Uploads/Photos/年-月-日/文件编号.htm if (!Page.IsPostBack) { System.IO.DirectoryInfo outputPath = new System.IO.DirectoryInfo(this.OutputPath); System.IO.DirectoryInfo[] subOutputPaths = outputPath.GetDirectories(); foreach (System.IO.DirectoryInfo subOutputPath in subOutputPaths) { DropDownListDirectory.Items.Add(new ListItem(subOutputPath.Name, subOutputPath.FullName.Replace(this.OutputPath, ""))); } BindImages(); } }
protected void Page_Load(object sender, EventArgs e) { // 临时目录不存在,则创建 string outputPath = "~/Uploads/Temp/"; string physicalOutputPath = Server.MapPath(outputPath); if (!System.IO.Directory.Exists(physicalOutputPath)) System.IO.Directory.CreateDirectory(physicalOutputPath); #warning 在aspx中配置临时目录 FileSystemProcessor fs = new FileSystemProcessor(); fs.OutputPath = outputPath; DJUploadController1.DefaultFileProcessor = fs; VideoFile.FileProcessor = fs; // 获取文章信息 string requestArticleGuid = Request.QueryString["ArticleGuid"]; if (string.IsNullOrEmpty(requestArticleGuid) || !Wis.Toolkit.Validator.IsGuid(requestArticleGuid)) { Warning.InnerHtml = "不正确的文章编号,请<a href='ArticleSelectCategory.aspx'>点击这里</a>重新操作"; return; } this.ArticleGuid = new Guid(requestArticleGuid); if (article == null) { if (articleManager == null) articleManager = new Wis.Website.DataManager.ArticleManager(); article = articleManager.GetArticleByArticleGuid(this.ArticleGuid); } //if (article.Category.ArticleType != 3) //{ // Wis.Toolkit.ClientScript.Window.Alert("当前内容不为视频内容,请先设定好该新闻分类的类别"); // Wis.Toolkit.ClientScript.Window.Redirect(string.Format("CategoryUpdate.aspx?CategoryGuid={0}", article.Category.CategoryGuid)); // return; //} HyperLinkCategory.Text = article.Category.CategoryName; HyperLinkCategory.NavigateUrl = string.Format("ArticleList.aspx?CategoryGuid={0}", article.Category.CategoryGuid); if (!article.Category.ThumbnailWidth.HasValue || !article.Category.ThumbnailHeight.HasValue) { Warning.InnerHtml = "缩微图的宽度和高度需要指定,请<a href='CategoryUpdate.aspx?CategoryGuid={0}' target='_blank'>点击这里</a>设定"; return; } this.ThumbnailWidth = article.Category.ThumbnailWidth.Value; this.ThumbnailHeight = article.Category.ThumbnailHeight.Value; }