Asp.net源码专业站
首页->博客空间->SpaceBuilderV1.0RC免安装版源码(51aspx调测)>>BasicWebControls/Channel/Search/SearchBlock.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:SpaceBuilderV1.0RC免安装版源码(51aspx调测)
当前文件:文件类型 SpaceBuilderV10RC/BasicWebControls/Channel/Search/SearchBlock.cs[7K,2009-6-12 11:55:43]打开代码结构图
普通视图
		            
1//------------------------------------------------------------------------------ 2// <copyright company="Tunynet"> 3// Copyright (c) Tunynet Network Technology Co., Ltd. All rights reserved. 4// </copyright> 5//------------------------------------------------------------------------------ 6 7using System; 8using System.Collections.Generic; 9using System.Text; 10using SpaceBuilder.Controls.BaseClasses; 11using SpaceBuilder.Components; 12using System.Web.UI.WebControls; 13using SpaceBuilder.Configuration; 14using SpaceBuilder.Bookmarks.Components; 15using SpaceBuilder.Events.Components; 16using TunyNet.Utils; 17using SpaceBuilder.Clubs.Components; 18using SpaceBuilder.Posts.Components; 19 20namespace SpaceBuilder.Search.Controls 21{ 22 public class SearchBlock : TemplatedWebControl 23 { 24 SBContext wlContext = SBContext.Current; 25 protected override void OnInit(EventArgs e) 26 { 27 if (SkinName == null) 28 ExternalSkinFileName = "/Searchs/Skin-SearchBlock.ascx"; 29 else 30 ExternalSkinFileName = SkinName; 31 32 base.OnInit(e); 33 } 34 35 Child Controls 42 43 protected override void AttachChildControls() 44 { 45 keyword = FindControl("Keyword") as TextBox; 46 47 searchTypeDDL = FindControl("SearchTypeDDL") as DropDownList; 48 49 searchButton = FindControl("SearchButton") as Button; 50 searchButton.Click += new EventHandler(SearchButton_Click); 51 } 52 53 54 protected override void OnLoad(EventArgs e) 55 { 56 base.OnLoad(e); 57 EnsureChildControls(); 58 if (!Page.IsPostBack) 59 { 60 searchTypeDDL.Items.Clear(); 61 if (SBConfiguration.Instance().EnableSNS) 62 searchTypeDDL.Items.Add(new ListItem("会员", ((int)FullTextSearchType.PersonUser).ToString())); 63 64 if (SBConfiguration.Instance().EnableBlog) 65 searchTypeDDL.Items.Add(new ListItem("博客", ((int)FullTextSearchType.Blog).ToString())); 66 67 if (SBConfiguration.Instance().EnableGallery) 68 searchTypeDDL.Items.Add(new ListItem("图片", ((int)FullTextSearchType.Gallery).ToString())); 69 70 if (SBConfiguration.Instance().EnableFileGallery) 71 searchTypeDDL.Items.Add(new ListItem("文件", ((int)FullTextSearchType.FileGallery).ToString())); 72 73 if (SBConfiguration.Instance().EnableBookmark) 74 searchTypeDDL.Items.Add(new ListItem("网摘", ((int)FullTextSearchType.Bookmark).ToString())); 75 76 if (SBConfiguration.Instance().EnableForum || SBConfiguration.Instance().EnableClub) 77 searchTypeDDL.Items.Add(new ListItem("论坛", ((int)FullTextSearchType.Forum).ToString())); 78 79 if (SBConfiguration.Instance().EnableEvent) 80 searchTypeDDL.Items.Add(new ListItem("活动", ((int)FullTextSearchType.Event).ToString())); 81 82 if (SBConfiguration.Instance().EnableClub) 83 searchTypeDDL.Items.Add(new ListItem("圈子", ((int)FullTextSearchType.Club).ToString())); 84 } 85 } 86 87 事件 176 177 } 178} 179 180
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:SpaceBuilderV1.0RC免安装版源码(51aspx调测)
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146