Irwsoft Web Control

ReadOnlyText
Brief Information
DescriptionA control to display read-only text.
FeaturesBind one property at once.
ReadOnlyText control
ReadOnlyText control to display FirstName and LastName


The IWC ASP.net ReadOnlyText control is a control to display read-only text. The control can bind one property only, usually used to display data in Form with View data mode.

All IWC input control designed using MVVM pattern which mean you can have a data-model class representing a domain/table, but ofcourse you can still using classic CRUD programming without any data-model. You can use simple C# class, Irwsoft Data Framework, Entity Framework, Linq to Sql or other .NET ORM. Then set its data-source and some properties to bind. The multi-properties means the control handle input at once using data masking.

Example : Displays FirstName and LastName data of Person table with ReadOnlyText at once


C# code for Person table

// 1) Sample code for Person table
public class Person
{
     public int ID { get; set;}
     public string FirstName { get; set;}  // 2) Input FirstName and LastName property of Person.
     public string LastName { get; set;}
     public GenderType Gender { get; set;}
     public DateTime DateOfBirth { get; set;}
     public int Age { get; set;}
     public string Address { get; set;}
     public string City { get; set;}
     public string Country { get; set;}
     public string IdentityCardNo { get; set;}
     public string BioData { get; set;}
     public string PictureUrl { get; set;}
}


ASPX code for ReadOnlyText

// 1) Defines the ReadOnlyText control for FirstName and LastName
<irw:ReadOnlyText ID="Name" runat="server" SkinStyle="SkyBlue" DataFormat="{0} {1}">
     <ViewPropertyNames>  // 2) Defines FirstName and LastName property to bind inside ViewPropertyNames tag
          <irw:ViewPropertyName Name="FirstName" />
          <irw:ViewPropertyName Name="LastName" />
     </ViewPropertyNames>
</irw:ReadOnlyText>


Related Topics :


Irwsoft Data Ultimate Edition 4.0 supports data-schema extension (entity framework, linq to sql, simple class, and etc).