Click here to Skip to main content
15,896,915 members
Articles / Web Development / ASP.NET

Eucalypto - ASP.NET CMS Library using NHibernate

Rate me:
Please Sign up or sign in to vote.
4.84/5 (36 votes)
10 Jun 2009MIT24 min read 321.8K   4.6K   260  
An ASP.NET server library for creating CMS website (forums, articles/wiki, news, users/roles, ...), using NHibernate for data access.
<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="EditItem.aspx.cs"
    Inherits="News_EditItem" Title="Edit news item" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="contentPlaceHolder" runat="Server">

    <h1>Edit news item</h1>

    <div>
        <table>
            <tr>
                <td>
                    <label for="txtTitle">Title:</label>
                </td>
                <td>
                    <asp:TextBox ID="txtTitle" runat="server" MaxLength="100" Columns="50" ></asp:TextBox>
                    <asp:RequiredFieldValidator ID="validatorTitle" runat="server" ControlToValidate="txtTitle"
                         ErrorMessage="Title field is required"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="txtDescription">Description:</label>
                </td>
                <td>
                    <asp:TextBox ID="txtDescription" runat="server" MaxLength="300" Columns="50" TextMode="MultiLine" Rows="3"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="txtOwner">Owner:</label>
                </td>
                <td>
                    <asp:TextBox ID="txtOwner" runat="server" MaxLength="100" Enabled="false"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="txtAuthor">Author:</label>
                </td>
                <td>
                    <asp:TextBox ID="txtAuthor" runat="server" MaxLength="100"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="txtURL">URL:</label>
                </td>
                <td>
                    <asp:TextBox ID="txtURL" runat="server" MaxLength="300" Columns="50"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtURL"
                         ErrorMessage="Url field is required"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="txtURLName">URL Name:</label>
                </td>
                <td>
                    <asp:TextBox ID="txtURLName" runat="server" MaxLength="100"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtURLName"
                         ErrorMessage="Url name field is required"></asp:RequiredFieldValidator>
                </td>
            </tr>            
            <tr>
                <td>
                    <label for="txtNewsDate">News date (yyyymmdd):</label>
                </td>
                <td>
                    <asp:TextBox ID="txtNewsDate" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtNewsDate"
                         ErrorMessage="Date field is required"></asp:RequiredFieldValidator>
                </td>
            </tr>                
        </table>

        <p>
            <asp:Button ID="btSave" runat="server" Text="Save" OnClick="btSave_Click" />
            <asp:Button ID="btCancel" runat="server" Text="Cancel" OnClick="btCancel_Click" CausesValidation="false" />
        </p>
    </div>

    
</asp:Content>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Software Developer
Italy Italy
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions