By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,967 Members | 815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,967 IT Pros & Developers. It's quick & easy.

check property exists in template control

P: n/a
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

Oct 2 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.