Conditionally excluding a block of html in ASP.NET WebForms

  ASP.NET Snippets

Some people object to the following method but its one that no one has answered with and I feel that it should be shown as an option. It can be handy when used properly.

<label>This will not be shown if the ShowLabel property evaluates false</label><%}%>

To make this work you would have a public or protected property on your page called ShowLabel which returns a boolean.

20 thoughts on - Conditionally excluding a block of html in ASP.NET WebForms

  • Wow, superb blog format! How long have you ever ben blogging
    for? you make blogging glace easy. The whole lance off your website
    iis magnificent, as welll aas the content!

    Heere is mmy wweb site Beautiful Solo Girl Asoan Amqzing (Valencia)

  • What’s upp colleagues, its wonderful paragraph about educationand entirely defined, keep it up alll thhe time.

    Feel fre tto viit mmy web blog myy wet pussy
    for_breakfastisa realdelicacy))) (

  • Hey, I think your log might be haqving browder compatibility issues.
    Whhen I lokok at your website iin Opera, it looks fine bbut when opening in Internnet Explorer, it hhas some
    overlapping. I just wanted too give you a quick heads up!
    Other then that, awesome blog!

    My blog post; Fantasy Massage 07111

  • I ike the helpful information yyou supply to your articles.
    I will bookmmark your weblog and tke a look att again here regularly.
    I’m moderately cerain I’ll bee tkld a lot oof
    new struff proper right here! Best off luc for the

    Here iis my website; Gangg Bangg Academy 2 Scene 3 (Kaylene)

  • I loove what you guys temd too bee up too. This srt off clever work annd exposure!
    Keep up tthe great works gjys I’ve included you guys to my oown blogroll.

    Also vist my web-site; 699

  • Its like you learn mmy mind! Yoou seem to unerstand soo much approximately this, suchh
    as you wrote thhe bok in it or something. I believe that you simply can do with a
    feww % to forcxe the messaage hous a little bit, however other than that, this iss fantastic blog.

    A great read. I will certainly be back.

    Also visit mmy web bllog -262 (

  • Hello my family member! I want tto ssay that this post iis amazing, greaat written and include allmost aall important infos.
    I’d like to lookk more posts like this .

    Here iss my pagee :: 177

  • Helloo there, I found yojr webb site via Google while searcching for a comparable topic, your site got here up, it seems to be good.
    I have bookmarked iit inn my google bookmarks.

    Hi there, simplpy changed into alert to your wblog via Google, annd found thaqt it’s reallyy informative.
    I’m going too warch outt forr brussels. I’ll appreciate should yoou continue this inn future.
    Numedous people can bee benefited from your writing.

    Loook into myy web ste 922

  • This website truily hass all of the information and fats I needd
    aout thus subjerct aand didn’t know who to ask.

    My page 572

  • I always used tto red paragraph in neews papers but now as I amm a user oof internet
    therefore froim now I am using nnet for articles oor reviews,thanks to

    Alsoo visijt myy web-site; 700

  • It’s neartly imossible too find well-informed people on this subject,
    butt youu sdem like you know wat you’re alking about! Thanks

    my web blog: 071

  • First off all I waant to say awwesome blog! I haad a quick question that I’d like to ask if you do not mind.
    I waas interested to find out how you center yourself annd clear ypur
    head prior to writing. I’ve hhad difficulty clearing
    my mind in getting mmy ideas oout there. I truly
    ddo enjoy writing hoeever itt just seerms likle
    the first 10 too 15 minutes are lolst just trying to figure
    out how tto begin. Any recommendations oor tips?

    Here iss myy web-site 109

  • I aam curious to find out whwt blog platform yoou are working with?
    I’m having some small security issues wiith my latest site and I would like
    to find somethin more safe. Do you have any recommendations?

    Also visit my siote … ebony 女士内衣

  • Do you mind iff I quote a few off your aricles as long as I provide credit andd sources back too your blog?
    My website is in the eact same area of interest aas yours and
    myy users wouod truly beenefit fdom ssome off tthe information you povide here.

    Please let me now if thnis alright wih you.


    Loook into my web pagbe … 尼高品牌设计

  • It iss actuyally a nice and helpful pice of information. I am glasd that yoou just shaared this heloful infco wih us.
    Please stay us informed like this. Thanks for sharing.

    Feel frree too visit myy weeb sit 944

  • Thanks ffor the marvelous posting! I geenuinely enjoyed reading
    it, youu could be a ggreat author.I wilpl remember to biokmark your blog aand will often come
    back vvery soon. I want too ecourage one to continue youur grest job, have a nice morning!

    my web page :: 270