CoComment.cs :  » Bloggers » SubText » Subtext » Web » Controls » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » Bloggers » SubText 
SubText » Subtext » Web » Controls » CoComment.cs
#region Disclaimer/Info

///////////////////////////////////////////////////////////////////////////////////////////////////
// Subtext WebLog
// 
// Subtext is an open source weblog system that is a fork of the .TEXT
// weblog system.
//
// For updated news and information please visit http://subtextproject.com/
// Subtext is hosted at Google Code at http://code.google.com/p/subtext/
// The development mailing list is at subtext@googlegroups.com 
//
// This project is licensed under the BSD license.  See the License.txt file for more information.
///////////////////////////////////////////////////////////////////////////////////////////////////

#endregion

using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Web.UI;

namespace Subtext.Web.Controls{
    /// <summary>
    /// Summary description for CoComment.
    /// </summary>
    [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Co")]
    public class CoComment : Control
    {
        /// <summary>
        /// Gets or sets the blog tool.
        /// </summary>
        /// <value>The blog tool.</value>
        public string BlogTool
        {
            get { return ViewState["BlogTool"] as string; }
            set { ViewState["BlogTool"] = value; }
        }

        /// <summary>
        /// Gets or sets the blog URL.
        /// </summary>
        /// <value>The blog URL.</value>
        public string BlogUrl
        {
            get { return ViewState["BlogUrl"] as string; }
            set { ViewState["BlogUrl"] = value; }
        }

        /// <summary>
        /// Gets or sets the blog title.
        /// </summary>
        /// <value>The blog title.</value>
        public string BlogTitle
        {
            get { return ViewState["BlogTitle"] as string; }
            set { ViewState["BlogTitle"] = value; }
        }

        /// <summary>
        /// Gets or sets the post title.
        /// </summary>
        /// <value>The post title.</value>
        public string PostTitle
        {
            get { return ViewState["PostTitle"] as string; }
            set { ViewState["PostTitle"] = value; }
        }

        /// <summary>
        /// Gets or sets the post URL.
        /// </summary>
        /// <value>The post URL.</value>
        public string PostUrl
        {
            get { return ViewState["PostUrl"] as string; }
            set { ViewState["PostUrl"] = value; }
        }

        /// <summary>
        /// Gets or sets the name of the comment author field.
        /// </summary>
        /// <value>The name of the comment author field.</value>
        public string CommentAuthorFieldName
        {
            get { return ViewState["CommentAuthorFieldName"] as string; }
            set { ViewState["CommentAuthorFieldName"] = value; }
        }

        /// <summary>
        /// Gets or sets the name of the comment text field.
        /// </summary>
        /// <value>The name of the comment text field.</value>
        public string CommentTextFieldName
        {
            get { return ViewState["CommentTextFieldName"] as string; }
            set { ViewState["CommentTextFieldName"] = value; }
        }

        /// <summary>
        /// Gets or sets the comment button id.
        /// </summary>
        /// <value>The comment button id.</value>
        public string CommentButtonId
        {
            get { return ViewState["CommentButtonId"] as string; }
            set { ViewState["CommentButtonId"] = value; }
        }

        public string CommentFormId
        {
            get { return ViewState["CommentFormId"] as string; }
            set { ViewState["CommentFormId"] = value; }
        }

        /// <summary>
        /// Sends server control content to a provided <see cref="T:System.Web.UI.HtmlTextWriter"/> object, which writes the content to
        /// be rendered on
        /// the client.
        /// </summary>
        /// <param name="writer">The <see langword="HtmlTextWriter"/> object that receives the server control content.</param>
        protected override void Render(HtmlTextWriter writer)
        {
            writer.Write(string.Format(CultureInfo.InvariantCulture, ScriptHelper.UnpackScript("CoCommentScript.js"),
                                       BlogTool, BlogUrl, BlogTitle, PostTitle, PostUrl, CommentAuthorFieldName,
                                       CommentTextFieldName, CommentButtonId, CommentFormId));
        }
    }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.