打开Defult.aspx,当场就傻了眼:
主要内容如下所示:
<mp:ContentContainer runat="server" id="MPContainer" MasterPageFile="~/Themes/MasterPage.ascx">
<mp:Content id="HeadTag" runat="server">
<meta http-equiv="Refresh" content="300" />
</mp:Content>
<mp:Content id="HeadTag" runat="server">
<meta http-equiv="Refresh" content="300" />
</mp:Content>
<mp:Content id="MainContent" runat="server">
<Forums:ForumGroupView runat="server" />
</mp:Content>
</mp:ContentContainer>
<Forums:ForumGroupView runat="server" />
</mp:Content>
</mp:ContentContainer>
晕,这个mp是什么东西?根据
~/Themes/MasterPage.ascx这一线索找到themes目录下的masterpage.ascx文件.
打开发现:
<!-- ********* NoBugForm:START ************* //-->
<mp:NoBugForm runat="server">
<mp:NoBugForm runat="server">
<mp:region id="MainContent" runat="server">Default main content</mp:region>
</mp:NoBugForm>
<!-- ********* NoBugForm:END ************* //-->
<!-- ********* NoBugForm:END ************* //-->
<!-- ********* Footer:START ************* //-->
<Forums:Footer runat="server" /><br />
<Forums:Footer runat="server" /><br />
这样的内容.
先来看看,这个footer是什么东西吧.查找footer文件,在aspforum2/Controls/Utility下找到了.
打开一看:
string copy ="(C)Copyright 2004, ";
string rights = " All Rights Reserved.";
writer.Write("<p align=/"center/" class=/"txt4/">");
writer.Write(copy + "<a href=/" http://www.hidotnet.com//">hiDotNet.com.</a>"+rights+"<br >");
writer.Write( "<a href=/"mailto:" + Globals.GetSiteSettings().AdminEmailAddress + "/">" + ResourceManager.GetString("Footer_QuestionsProblems") + "</a> | <a href=/"/">" + ResourceManager.GetString("Footer_TermsOfUse") + "</a><br><br>");
writer.Write( "<a target=/"_blank/" href=/" http://www.telligentsystems.com/Solutions/Forums//"><img alt=/"" + string.Format(ResourceManager.GetString("Footer_PoweredBy"), "Community Server :: Forums") + "/" border=/"0/" src=/"" + Globals.GetSiteUrls().Home + "utility/EULA.GIF" + "/"></a>");
writer.Write( " <a target=/"_blank/" href=/" http://bbs.hidotnet.com//"><img alt=/"" + ResourceManager.GetString("Footer_CnPoweredBy") + "/" border=/"0/" src=/"" + Globals.GetSiteUrls().Home + "utility/hiDotNet.gif" + "/"></a><br>");
writer.Write("</p>");
string rights = " All Rights Reserved.";
writer.Write("<p align=/"center/" class=/"txt4/">");
writer.Write(copy + "<a href=/" http://www.hidotnet.com//">hiDotNet.com.</a>"+rights+"<br >");
writer.Write( "<a href=/"mailto:" + Globals.GetSiteSettings().AdminEmailAddress + "/">" + ResourceManager.GetString("Footer_QuestionsProblems") + "</a> | <a href=/"/">" + ResourceManager.GetString("Footer_TermsOfUse") + "</a><br><br>");
writer.Write( "<a target=/"_blank/" href=/" http://www.telligentsystems.com/Solutions/Forums//"><img alt=/"" + string.Format(ResourceManager.GetString("Footer_PoweredBy"), "Community Server :: Forums") + "/" border=/"0/" src=/"" + Globals.GetSiteUrls().Home + "utility/EULA.GIF" + "/"></a>");
writer.Write( " <a target=/"_blank/" href=/" http://bbs.hidotnet.com//"><img alt=/"" + ResourceManager.GetString("Footer_CnPoweredBy") + "/" border=/"0/" src=/"" + Globals.GetSiteUrls().Home + "utility/hiDotNet.gif" + "/"></a><br>");
writer.Write("</p>");
不会吧.连footer都是做死在自定义控件中的.这样会不会太麻烦.不知道做forums的是怎么想的?
不管怎样,最后的效果如图一所示:
图片是居中显示的,当然是因为其使用了<p align="center">的原因.
这样的话,来看看aspnetforums到底都有些什么控件大类吧.
在bin目录下很容易找到以下文件:
AspNetForums.Components.dll、AspNetForums.Controls.dll、FreeTextBox.dll、PhotoPropertiesLibrary.dll
试着把aspnetforunm.controls.dll加到工具箱中,太多的子控件了,机器慢得很.
下一节,我们将主要精力放在这个mp控件上
下一节