Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 17th, 2016, 10:04 AM
Registered User
 
Join Date: Nov 2016
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 13 Convert into TemplateField

On page 463, we converted the "Authorized" field into Template Field. What does it actually do?

The explanation on page 465 states that a template column gives you full freedom with regard to the content you are presenting.

What does it actually means? Can anyone please elaborate more, thank you very much.
 
Old November 17th, 2016, 09:36 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

If you don't convert it to a template, .NET will decide what to render, which in this case will be a checkbox.

By converting it to a template, you get full control over the HTML that is rendered for that field. This means you can add a label in front of it, add additional CSS classes, replace a checkbox with a true/false type of image etc.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
No Access to TemplateField in Gridview tasmin96 BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 1 July 2nd, 2010 02:30 PM
[Resolved] GridView TemplateField - get value snufse ASP.NET 2.0 Basics 25 July 29th, 2008 07:25 AM
Can not Edit gridview having TemplateField coolcoder2007 .NET Framework 2.0 4 March 6th, 2008 06:36 AM
Dynamically creating TemplateField.... aekta ASP.NET 2.0 Professional 1 March 19th, 2007 02:26 PM
TemplateField control access cmw231 ASP.NET 2.0 Basics 0 July 11th, 2006 08:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.