ASP.NET简洁论坛源代码
这是一个简单的论坛
源代码在线查看: script.cs
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using NetFocus.Web.Core;
namespace NetFocus.Web.Applications.Forum
{
public class Script : LiteralControl
{
private const string srcFormat = "";
[DefaultValue( "Utility/global.js" )]
public virtual String Src
{
get
{
Object state = ViewState["Src"];
if ( state != null )
{
return "Utility/" + (String)state;
}
return "Utility/global.js";
}
set
{
ViewState["Src"] = value;
}
}
protected override void Render(HtmlTextWriter writer)
{
writer.Write(srcFormat, Globals.ApplicationPath, Src + "?tag=" + Guid.NewGuid().ToString());
}
}
}