ASP Panel v ASP Placeholder

I always get the feeling that there is not much difference between the asp:panel
and asp:placeholder server controls in ASP.NET. The Panel control
is useful for grouping together other controls or HTML segments. The control
can be thought of as the server side equivalent of the <div> tag. The PlaceHolder control
can also be used for the same purpose, but there is no HTML output for the control
itself.

Now, let’s consider the following code:

<asp:Panel BackColor="#FF0000" Height="50" 
Width="200" ID="panel1" runat="server">
hello world
</asp:Panel>

When, it’s run in the browser, the following HTML is generated

<div id="panel1" 
style="background-color:Red;height:50px;width:200px;">
hello world
</div>

and visually:

hello world

But, when we look at the ASPX file in Dreamweaver MX, we don’t see
the correct visual representation. Furthermore, we are unable to edit
the HTML inside of the asp:panel tag. This can be a bit irritating
for developers. To understand why this happens, we need to look at
the way that Dreamweaver MX renders ASP.NET server controls. Under
the hood, there is a Translation class that talks to the file MM.ASPNetDesignerMgr.dll.
The return from the class is the actual HTML that would be generated
from an ASPX page. This HTML is then shown in the design view in MX.
In other words, the control is treated as a single unit. This kind
of translation is very useful for the datagrid, datalist and other
similar controls. But, for the asp:panel, it is effectively rendered
useless.

Next, we can consider the code for an asp:placeholder:

<asp:PlaceHolder 
 ID="holder1" runat="server">
hello world
</asp:PlaceHolder>

When we view this code in the design view of MX, we are able to edit the HTML
within the tag. This is because the tag is not sent to the ASP.NET designer
and is rendered normally in MX.

So, this outlines the relative merits of using the Panel and PlaceHolder server
controls in ASP.NET. Personally, I always use the PlaceHolder. Mainly because
I’m able to edit the HTML inside the tag. Maybe MM should allow developers
to edit the HTML within the Panel too. I’m not sure to be honest. Maybe they
have sound reasons for leaving it as it is.

Updated: March 6, 2015 — 5:01 pm

Comments

Add a Comment
  1. Your comment is awaiting moderation.

    Kudos. A lot of facts.

    https://www.viagrawithoutdoctormsn.com/
    viagra blurred vision
    viagra without a doctors prescription
    viagra delay ejaculation
    viagra 100mg

  2. Your comment is awaiting moderation.

    You actually mentioned that adequately!
    https://www.viagrawithoutdoctorbnt.com/
    viagra refills
    viagra for women
    viagra type of medicines
    viagra without a doctor prescription

  3. Your comment is awaiting moderation.

    You made the point.
    https://www.viagrawithoutdoctorbnt.com/
    viagra and toporl
    buy viagra
    order viagra today
    viagra pills

  4. Your comment is awaiting moderation.

    You mentioned that adequately.
    https://www.genericviagracubarx.com/
    viagra and love
    generic viagra 100mg
    how much arginine is in viagra
    buy viagra online

  5. Your comment is awaiting moderation.

    With thanks, Helpful information!
    https://www.viagrawithoutdoctorntx.com/
    viagra rebate
    viagra without a doctors prescription
    cialis viagra sale
    viagra pills

  6. Your comment is awaiting moderation.

    Cheers, Plenty of content.

    https://www.viagrawithoutdoctorntx.com/
    viagra frm canada
    cheap viagra
    pantyhose or viagra
    viagra without a doctor prescription

  7. Your comment is awaiting moderation.

    Very good info, Many thanks.
    https://www.genericviagracubarx.com/
    xtc viagra
    viagra pills
    hiv viagra
    buy generic viagra

  8. Your comment is awaiting moderation.

    Thanks a lot. Helpful stuff!
    https://www.viagrawithoutdoctormsn.com/
    discrete viagra australia
    buy viagra
    sildenafil tablet viagra
    viagra generic

  9. Your comment is awaiting moderation.

    Good info. Thanks a lot!
    https://www.viagrawithoutdoctormsn.com/
    whats in herbal viagra
    generic viagra 100mg
    does doxazosin react to viagra
    generic viagra

  10. Your comment is awaiting moderation.

    Awesome facts. Many thanks.
    https://www.genericviagracubarx.com/
    viagra discounts senators
    generic viagra 100mg
    viagra cardiovascular activity
    generic viagra 100mg

  11. Your comment is awaiting moderation.

    Amazing info. Cheers.
    https://www.viagrawithoutadoctorsmim.com/
    how to buy viagra on line
    buy viagra online
    viagra making blind
    viagra without a doctor prescription

  12. Your comment is awaiting moderation.

    You actually reported this terrifically.
    https://www.viagrawithoutadoctorsmim.com/
    personal experience using viagra
    viagra for sale uk
    what drug is like viagra
    generic viagra

  13. Your comment is awaiting moderation.

    Cheers. Quite a lot of material!

    https://www.viagrawithoutdoctormsn.com/
    viagra and celias
    buy generic viagra
    prescription for the real authentic viagra
    viagra without a doctors prescription

  14. Your comment is awaiting moderation.

    Cheers. Helpful information!
    https://www.viagrawithoutdoctorbnt.com/
    boys england viagra
    viagra without a doctor prescription
    viagra useless
    viagra for sale uk

  15. Your comment is awaiting moderation.

    Thank you. A good amount of tips!

    https://www.viagrawithoutdoctormsn.com/
    viagra and statins
    buy viagra
    cuba gooding viagra commercial
    viagra 100mg

  16. Your comment is awaiting moderation.

    Seriously lots of helpful data!
    https://www.viagrawithoutdoctorntx.com/
    viagra without rx
    buy generic viagra
    keywords buy viagra
    viagra without a doctor prescription

  17. Your comment is awaiting moderation.

    Very good information. Many thanks.
    https://www.viagrawithoutdoctormsn.com/
    viagra cialis store
    generic viagra
    when bush takes viagra
    viagra without a doctor prescription

  18. Your comment is awaiting moderation.

    Regards. Quite a lot of knowledge!

    https://www.viagrawithoutdoctormsn.com/
    apa itu viagra
    buy viagra
    compare viagra cialis and levitra
    generic viagra online

  19. Your comment is awaiting moderation.

    Cheers! Loads of data.

    https://www.viagrawithoutadoctorsmim.com/
    viagra hardon
    buy generic viagra
    does viagra negatively effect orgasm
    generic viagra 100mg

  20. Your comment is awaiting moderation.

    You suggested this fantastically.
    https://www.viagrawithoutdoctorntx.com/
    avarage age viagra
    generic viagra 100mg
    sex viagra xanax
    viagra for sale uk

  21. Your comment is awaiting moderation.

    Useful data. Cheers.
    https://www.viagrawithoutdoctorbnt.com/
    viagra testimontials
    generic viagra 100mg
    dllove314 viagra
    generic viagra 100mg

  22. Your comment is awaiting moderation.

    Seriously a lot of helpful knowledge.
    https://www.genericviagracubarx.com/
    free viagra with order
    viagra 100mg
    viagra 50mg tablet cost
    viagra generic

  23. Your comment is awaiting moderation.

    Truly tons of very good advice.
    https://www.genericviagracubarx.com/
    continuing medical education california viagra
    generic viagra online
    anti viagra
    viagra generic

  24. Your comment is awaiting moderation.

    You actually revealed that wonderfully!
    https://www.viagrawithoutadoctorsmim.com/
    jackie corbin and viagra
    viagra 100mg
    cialis compared to viagra
    buy viagra online

  25. Your comment is awaiting moderation.

    You actually revealed this perfectly!
    https://www.viagrawithoutdoctormsn.com/
    viagra food restrictions
    viagra pills
    view generic viagra from india
    generic viagra

  26. Your comment is awaiting moderation.

    Really loads of very good knowledge.
    https://www.viagrawithoutadoctorsmim.com/
    cheapest viagra homepage
    viagra for sale uk
    viagra blogs
    viagra pills

  27. Your comment is awaiting moderation.

    You expressed that fantastically!
    https://www.viagrawithoutadoctorsmim.com/
    viagra in india
    viagra without a doctor prescription
    viagra women online viagra women url
    viagra without a doctors prescription

  28. Your comment is awaiting moderation.

    Wow plenty of superb material.
    https://www.genericviagracubarx.com/
    online viagra scam
    viagra 100mg
    levitracialis compare levitra viagra
    viagra for sale uk

  29. Your comment is awaiting moderation.

    Nicely put. Thanks a lot.
    https://www.viagrawithoutdoctormsn.com/
    effexor viagra
    buy viagra online
    viagra cactus pcture
    generic viagra 100mg

  30. Your comment is awaiting moderation.

    You suggested that well.
    https://www.viagrawithoutdoctorbnt.com/
    viagra online overnight delivery
    buy viagra
    schematic viagra talking photo cube
    generic viagra

  31. Your comment is awaiting moderation.

    Nicely put. Regards!
    https://www.viagrawithoutdoctorntx.com/
    viagra ingestion are flushing headaches
    buy viagra
    viagra logo
    generic viagra 100mg

  32. Your comment is awaiting moderation.

    Really plenty of awesome facts.
    https://www.viagrawithoutdoctormsn.com/
    testical pain and viagra
    viagra without a doctors prescription
    lawsuits on viagra
    buy viagra

  33. Your comment is awaiting moderation.

    Regards! Great information!
    https://www.viagrawithoutadoctorsmim.com/
    revatio same as viagra
    viagra 100mg
    brand name viagra silagra cumwithuscom
    buy viagra

  34. Your comment is awaiting moderation.

    Many thanks! A lot of data!

    https://www.genericviagracubarx.com/
    what is maximum dosage of viagra
    viagra pills
    never mix steroids with viagra
    viagra online

  35. Your comment is awaiting moderation.

    With thanks. Plenty of stuff.

    https://www.viagrawithoutadoctorsmim.com/
    supplements that are like viagra
    generic viagra
    viagra available from online doctor
    viagra without a doctors prescription

  36. Your comment is awaiting moderation.

    Thanks. A good amount of stuff!

    https://www.viagrawithoutdoctormsn.com/
    viagra in chewing gum
    viagra pills
    buying viagra in a canadian pharmacy
    buy viagra

  37. Your comment is awaiting moderation.

    You definitely made your point!
    https://www.viagrawithoutdoctorntx.com/
    viagra cof forid 11
    generic viagra
    grow your own viagra
    buy viagra online

  38. Your comment is awaiting moderation.

    Amazing advice. Regards!
    https://www.viagrawithoutdoctormsn.com/
    viagra kamagra cialis aneros
    buy viagra
    natural viagra subsitute
    buy generic viagra

  39. Your comment is awaiting moderation.

    Thanks a lot! Ample data.

    https://www.viagrawithoutdoctormsn.com/
    ceneric viagra
    buy viagra online
    viagra healthy
    buy generic viagra

  40. Your comment is awaiting moderation.

    Amazing info, With thanks.
    https://www.viagrawithoutdoctorntx.com/
    antidepressants and viagra
    viagra without a doctor prescription
    online pharmacy viagra accepts paypal
    viagra online

  41. Your comment is awaiting moderation.

    Regards. A good amount of information!

    https://www.viagrawithoutadoctorsmim.com/
    viagra dicount
    viagra for women
    is levitra cheaper than viagra
    viagra pills

  42. Your comment is awaiting moderation.

    You actually stated this exceptionally well.
    https://www.viagrawithoutadoctorsmim.com/
    online is online viagra real
    generic viagra online
    boys england viagra
    generic viagra online

  43. Your comment is awaiting moderation.

    This is nicely put. .
    https://www.viagrawithoutdoctormsn.com/
    can viagra be taken with norvasc
    buy generic viagra
    anyone order viagra online blog
    generic viagra 100mg

  44. Your comment is awaiting moderation.

    This is nicely put! .
    https://www.viagrawithoutdoctormsn.com/
    cialis und viagra forum
    generic viagra
    viagra and infertility
    cheap viagra

  45. Your comment is awaiting moderation.

    Really all kinds of superb material!
    https://www.genericviagracubarx.com/
    celais and viagra
    viagra generic
    macular degeneration viagra
    generic viagra

  46. Your comment is awaiting moderation.

    Nicely put. Cheers!
    https://www.viagrawithoutadoctorsmim.com/
    viagra light switch cover
    viagra for women
    viagra drug profile
    viagra without a doctor prescription

  47. Your comment is awaiting moderation.

    Cheers. Lots of posts.

    https://www.viagrawithoutdoctorntx.com/
    buy viagra cheap india pharmacy
    buy viagra
    what ingredient in viagra
    generic viagra 100mg

  48. Your comment is awaiting moderation.

    This is nicely expressed. !
    https://www.viagrawithoutadoctorsmim.com/
    lipitor viagra
    cheap viagra
    nude beach viagra tease
    generic viagra 100mg

  49. Your comment is awaiting moderation.

    Thanks a lot. Quite a lot of material.

    https://www.genericviagracubarx.com/
    get viagra shipped discreetly
    viagra online
    viagra enter email address
    cheap viagra

  50. Your comment is awaiting moderation.

    Thanks a lot, I appreciate this.
    https://www.genericviagracubarx.com/
    purchase viagra from canada
    generic viagra online
    viagra cause of hearing problems
    viagra online

  51. Your comment is awaiting moderation.

    Beneficial information. Appreciate it.
    https://www.viagrawithoutdoctorntx.com/
    levitra cialis viagra
    viagra for sale uk
    natural form of viagra
    viagra pills

  52. Your comment is awaiting moderation.

    Regards. An abundance of data.

    https://www.viagrawithoutdoctorbnt.com/
    viagra talking photo cube
    generic viagra 100mg
    viagra pushups
    viagra without a doctors prescription

  53. Your comment is awaiting moderation.

    Nicely put, Thanks a lot!
    https://www.viagrawithoutdoctormsn.com/
    2 free viagra
    viagra without a doctors prescription
    viagra quantity restrications
    buy generic viagra

  54. Your comment is awaiting moderation.

    Thank you! An abundance of advice!

    https://www.viagrawithoutadoctorsmim.com/
    viagra viagra search find cheap pages
    cheap viagra
    do generic viagra work yahoo
    generic viagra 100mg

  55. Your comment is awaiting moderation.

    Amazing information. Thank you!
    https://www.viagrawithoutdoctormsn.com/
    viagra blushing
    buy viagra
    ad agency for viva viagra
    viagra generic

  56. Your comment is awaiting moderation.

    Regards! Numerous knowledge!

    https://www.viagrawithoutdoctorbnt.com/
    prednisilone and viagra
    viagra pills
    how to boost your viagra
    viagra 100mg

  57. Your comment is awaiting moderation.

    You suggested that wonderfully!
    https://www.viagrawithoutadoctorsmim.com/
    viagra require a prescription
    viagra without a doctors prescription
    viagra without a prescription legal
    buy viagra online

  58. Your comment is awaiting moderation.

    Awesome data. Many thanks.
    https://www.viagrawithoutadoctorsmim.com/
    best deals on cialis viagra
    generic viagra 100mg
    viagra cialis online order
    viagra for women

  59. Your comment is awaiting moderation.

    You actually revealed this very well.
    https://www.viagrawithoutadoctorsmim.com/
    south beach diet buy viagra
    generic viagra 100mg
    cialis levitra link pharmacies com viagra
    generic viagra 100mg

  60. Your comment is awaiting moderation.

    Nicely put. Regards.
    https://www.viagrawithoutdoctormsn.com/
    cheap 100mg viagra
    cheap viagra
    viagra on line store
    viagra online

  61. Your comment is awaiting moderation.

    Info clearly utilized.!
    https://www.viagrawithoutadoctorsmim.com/
    peyronie’s disease and viagra
    generic viagra online
    next day shipping on viagra
    buy generic viagra

  62. Your comment is awaiting moderation.

    With thanks. Fantastic stuff.
    https://www.viagrawithoutdoctorntx.com/
    recent status of viagra lawsuits
    generic viagra online
    cheapest viagra substitut
    viagra pills

  63. Your comment is awaiting moderation.

    Regards. Numerous information!

    https://www.viagrawithoutadoctorsmim.com/
    viagra and tinnitus
    viagra online
    female viagra response
    generic viagra

  64. Your comment is awaiting moderation.

    You actually reported that fantastically!
    https://www.genericviagracubarx.com/
    viagra result
    viagra for sale uk
    viagra onlin
    buy viagra

  65. Your comment is awaiting moderation.

    With thanks, Wonderful stuff!
    http://viagrawithoutadoctormsn.com/
    bonus viagra echeck
    generic viagra 100mg
    viagra tips
    generic viagra 100mg

  66. Your comment is awaiting moderation.

    You actually mentioned it perfectly.
    http://viagrawithoutadoctormsn.com/
    women using viagra
    buy viagra online
    mccain viagra commercial
    viagra pills

  67. Your comment is awaiting moderation.

    Well expressed indeed. .
    http://viagrapego.com/
    viagra free samples canada
    viagra online
    generic viagra drugs order brand pill
    viagra without a doctors prescription

  68. Your comment is awaiting moderation.

    Nicely put, Kudos.
    http://viagrapego.com/
    who invented viagra
    generic viagra
    citrate generic name sildenafil viagra
    viagra generic

  69. Your comment is awaiting moderation.

    Very good data. Many thanks.
    http://viagrawithoutadoctormsn.com/
    get viagra on the nhs
    cheap viagra
    how much viagra take
    viagra generic

  70. Your comment is awaiting moderation.

    Incredible plenty of helpful data.
    http://viagrawithoutadoctorsntx.com/
    athletes and viagra
    buy generic viagra
    japanese viagra with the red rocket
    viagra for women

  71. Your comment is awaiting moderation.

    Nicely put. With thanks!
    http://viagrapego.com/
    viagra generic low price
    generic viagra 100mg
    search viagra find cheap pages
    viagra without a doctor prescription

  72. Your comment is awaiting moderation.

    You mentioned it perfectly!
    http://viagrawithoutadoctorsntx.com/
    viagra and metoprolol er succinate
    generic viagra
    oragel viagra sex
    viagra generic

  73. Your comment is awaiting moderation.

    Amazing all kinds of wonderful info.
    http://viagrapego.com/
    viagra babies
    viagra pills
    prices on viagra
    viagra pills

  74. Your comment is awaiting moderation.

    You actually suggested this superbly.
    http://viagrapego.com/
    buy viagra per pill
    buy generic viagra
    viagra non perscription deal sale
    viagra generic

Leave a Reply

Your email address will not be published. Required fields are marked *