PC Review


Reply
Thread Tools Rate Thread

check property exists in template control

 
 
philip.poole@gmail.com
Guest
Posts: n/a
 
      2nd Oct 2007
Hi everyone,

I am settings up some .NET controls on my website and want to create
template controls to completely separate the business layer and the
presentation layer.

However I have situations when I may extract up to 4 fields from the
database but not all four may be populated. Is there any way with my
ASP.net markup that I can check to see if the template field is not
null before attempting to write out any markup.

For example:

My plugin has 4 fields, a, b, c, d which I can access through
Container.a, Container.b etc.

I could write this out as:
<li><a href="Container.a"></li>

However I would want to check that Contain.a is not null before
writing out that markup.

Is this possible as I do not really want to write 4 different template
controls to do this due to database performance.

Thanks

Phil

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Composite Control with DataList setting Template / Property berny.zamora@gmail.com Microsoft ASP .NET 1 14th May 2008 08:57 PM
Check Control.Visible property value news.microsoft.com Microsoft Dot NET Framework Forms 7 21st Apr 2006 03:15 AM
Check Control's property name exist or name Hardik Shah Microsoft VB .NET 4 11th Nov 2005 10:07 AM
How to set property of an asp:Hyperlink in a template from a user control. James P. Microsoft ASP .NET 4 15th Jun 2004 05:05 PM
How to check if a control exists? Quentin Huo Microsoft ASP .NET 2 29th May 2004 02:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:41 AM.