Click here to Skip to main content
15,897,273 members
Articles / General Programming / Architecture

Binding Web Pages with nHydrate

,
Rate me:
Please Sign up or sign in to vote.
4.71/5 (5 votes)
1 Jun 2011Ms-PL12 min read 21K   256   14  
Bind your UI controls to generated objects generically
<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="false" CodeBehind="CountryEdit.aspx.cs" Inherits="Acme.EFExample.Website.CountryEdit" EnableViewState="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<h2><asp:Literal ID="lblHeader" runat="server" /></h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent felis nisi, fringilla ac fermentum et, iaculis ac sapien. Donec posuere nibh blandit est bibendum vitae ullamcorper diam imperdiet. Praesent vitae lorem ac mauris dapibus vulputate et sed risus. Vestibulum laoreet commodo tortor nec egestas. 
</p>

<div>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" CssClass="summary" />
</div>

<div>
<span class="prompt">Name:</span>
<asp:TextBox ID="txtName" runat="server" />
</div>

<div class="buttonblock">
<asp:Button ID="cmdSave" runat="server" Text="Save" />
<a href="/countrylist.aspx">Cancel</a>
</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 Microsoft Public License (Ms-PL)



Written By
Software Developer (Senior) Hewlett Packard
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions