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.

    You’ve made your stand extremely clearly..

    soft viagra online generic viagra overnight
    generic viagra
    how to buy viagra on-line – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  2. Your comment is awaiting moderation.

    Thank you. Fantastic stuff!

    edinburgh viagra tid search charles viagra manufac
    buy viagra
    watermalon viagra – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  3. Your comment is awaiting moderation.

    Very good facts, Thanks!

    generic viagra with paypal clininc viagra prescriptions charlotte nc
    viagra for women
    search viagra viagra find generic buy – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  4. Your comment is awaiting moderation.

    Well voiced really! !

    review viagra cialas levitra viagra cheap india
    viagra for women
    india generic viagra legal – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  5. Your comment is awaiting moderation.

    Many thanks, Lots of write ups.

    fast viagra edinburgh uk viagra search cialis charles
    buy viagra
    viagra effective for women – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  6. Your comment is awaiting moderation.

    Wonderful content. Regards.

    viagra online non persription viagra
    generic viagra
    women on viagra – https://genericviagrarcp.com

    DavidBoins
    Terenceemuse
    Victorphemn

  7. Your comment is awaiting moderation.

    Thanks a lot. Loads of knowledge.

    cuming on viagra dog heart failure viagra
    generic viagra 100mg
    viagra canada samples – https://genericviagrarcp.com

    DavidBoins
    Terenceemuse
    Victorphemn

  8. Your comment is awaiting moderation.

    Cheers, Fantastic information!

    viagra testosterone mail order viagra in nanaimo
    cheap viagra
    how does viagra wook – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  9. Your comment is awaiting moderation.

    Appreciate it! Lots of content!

    viagra be very afraid greeting card viagra vancouver
    viagra for women
    viagra cause peyronies disease – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  10. Your comment is awaiting moderation.

    Appreciate it, Quite a lot of info.

    expectations of viagra viagra buy oonline
    cheap viagra
    women’s herbal viagra – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  11. Your comment is awaiting moderation.

    Useful posts. Regards.

    viagra non prescription viagra history
    viagra generic
    buy generic viagra without prescription – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  12. Your comment is awaiting moderation.

    Great info. With thanks.

    viagra not working how buy viagra
    viagra pills
    cialis medicine online order rx viagra – https://genericviagrarcp.com

    DavidBoins
    Terenceemuse
    Victorphemn

  13. Your comment is awaiting moderation.

    Cheers. Quite a lot of postings.

    viagra for sex u 45976 buy viagra online
    viagra without a doctor prescription
    cheap viagra from pfizer – https://genericviagrarcp.com

    DavidBoins
    Terenceemuse
    Victorphemn

  14. Your comment is awaiting moderation.

    Very good tips. Thanks a lot!

    back generic guarantee money viagra long term use of viagra
    generic viagra 100mg
    cialis online compare discount viagra – https://genericviagrarcp.com

    DavidBoins
    Terenceemuse
    Victorphemn

  15. Your comment is awaiting moderation.

    Great content, Kudos!

    viagra adds to my phone viagra woman’s opinions
    generic viagra online
    viagra and attacks heart – https://genericviagrarcp.com

    DavidBoins
    Terenceemuse
    Victorphemn

  16. Your comment is awaiting moderation.

    Helpful advice. Regards!

    viagra water continuing medical education california viagra
    viagra 100mg
    compare viagra cialis and lavitra – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  17. Your comment is awaiting moderation.

    Terrific content, Cheers!

    buying viagra in the dominican republic zoloft viagra ejaculation
    generic viagra
    viagra funny video – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  18. Your comment is awaiting moderation.

    You actually revealed it well.

    my husband took viagra viagra and zoloft
    viagra for women
    viagra genetic indian pharmacy – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  19. Your comment is awaiting moderation.

    Cheers. I value it!

    vasectomy and viagra viagra levitra cialis
    viagra for sale uk
    how much viagra is recommended – https://genericviagrarcp.com

    DavidBoins
    Terenceemuse
    Victorphemn

  20. Your comment is awaiting moderation.

    Thank you! An abundance of information!

    political cartoon with bush and viagra disease viagra heart
    viagra generic
    penile insertion viagra – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  21. Your comment is awaiting moderation.

    Thank you! Excellent information.

    cialas lavitra viagra viagra for wemon
    viagra online
    impotence drugs since viagra – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  22. Your comment is awaiting moderation.

    Amazing lots of awesome info.

    viagra sample dallas viagra 50 major general tablets
    generic viagra 100mg
    uso del viagra – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  23. Your comment is awaiting moderation.

    You stated that fantastically!

    erection viagra dicked women porn photos viagra fom india
    viagra generic
    free sample viagra womens – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  24. Your comment is awaiting moderation.

    You made your point pretty effectively..

    film irish viagra seduced straight boys viagra
    viagra online
    generic viagra sildenafil – https://genericviagrarcp.com

    DavidBoins
    Terenceemuse
    Victorphemn

  25. Your comment is awaiting moderation.

    You actually said this well.

    walnuts viagra viagra nitroglicerine
    viagra without a doctors prescription
    can women take viagra – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  26. Your comment is awaiting moderation.

    You stated it perfectly!

    type of mg of viagra viagra professonal
    viagra for women
    buy no prior viagra cialis levitra – https://genericviagrarcp.com

    DavidBoins
    Terenceemuse
    Victorphemn

  27. Your comment is awaiting moderation.

    You’ve made your point extremely clearly..

    viva viagra lyrics online viagra generic quick
    viagra pills
    my dog ate a viagra – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  28. Your comment is awaiting moderation.

  29. Your comment is awaiting moderation.

    You said it adequately..

    cheaper viagra female naked viagra
    buy viagra online
    viagra joks – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  30. Your comment is awaiting moderation.

    Thanks! Lots of information!

    keyword viagra online get viagra without prescription
    viagra for sale uk
    after using viagra – https://genericviagrarcp.com

    DavidBoins
    Terenceemuse
    Victorphemn

  31. Your comment is awaiting moderation.

    You actually stated it fantastically!

    first time viagra use viagra buy in uk online
    buy viagra online
    drug viagra zenegra – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  32. Your comment is awaiting moderation.

    You actually expressed it really well!

    viagra procedure use viagra on-line into singapore
    viagra online
    viagra on the lake – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  33. Your comment is awaiting moderation.

    You actually explained this effectively!

    viagra hats viagra medication prescription levitra cialis propecia
    viagra for women
    hur l nge sitter viagra i – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  34. Your comment is awaiting moderation.

    You’ve made your stand very clearly.!

    cialis vs viagra pharmacology scams vignor herbal viagra
    viagra online
    buy viagra in malaysia – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  35. Your comment is awaiting moderation.

    You actually said that terrifically.

    viagra triangle cleveland ohio lisinopril and viagra interaction
    viagra generic
    viagra wholesale – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  36. Your comment is awaiting moderation.

    You actually stated it effectively!

    cheapest viagra next day delivery uk viagra story
    viagra generic
    female equivalent to viagra – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  37. Your comment is awaiting moderation.

    You stated this very well!

    how to get generic brand viagra second best to viagra
    buy generic viagra
    cialis europe viagra – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  38. Your comment is awaiting moderation.

    Info effectively considered!.

    viagra equivalent herbal tablets generic levitra celias viagra
    viagra online
    generic viagra sildenafil paypal no prescription – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  39. Your comment is awaiting moderation.

    Really loads of good facts!

    viagra overnight get viagra cheapest viagra what cars are in viagra commercials
    buy generic viagra
    which is cheaper viagra or cialis – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  40. Your comment is awaiting moderation.

    Awesome material. With thanks.

    viagra clinic beijing viagra headquarters toronto
    viagra 100mg
    buy viagra without a prescription – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  41. Your comment is awaiting moderation.

    Nicely put, Thanks!

    viagra herb alternative alternative til viagra
    buy viagra online
    wholesale viagra – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  42. Your comment is awaiting moderation.

    Amazing quite a lot of valuable information.

    viagra mexco viagra prescription buy
    generic viagra 100mg
    how frequently can you take viagra – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  43. Your comment is awaiting moderation.

    Thanks a lot, Good stuff!

    viagra cialis herbal samples buy viagra phentermine meridia adipex xenical
    buy viagra
    viagra legal status in russia – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  44. Your comment is awaiting moderation.

    This is nicely said. .

    free older viagra movies viagra for sale online
    generic viagra 100mg
    effects alcohol viagra – https://genericviagrarcp.com

    DavidBoins
    Terenceemuse
    Victorphemn

  45. Your comment is awaiting moderation.

    Good advice. Thank you.

    plaintiffs gets settlement for viagra shopping online for viagra
    cheap viagra
    viagra recreational use – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  46. Your comment is awaiting moderation.

    Nicely put, Regards.

    buy viagra online canadian where can you buy viagra cheap
    viagra pills
    viagra hemmoroids – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  47. Your comment is awaiting moderation.

    Cheers! Quite a lot of information.

    company who makes viagra viagra in the water chords
    viagra without a doctor prescription
    prostate ca and urinary incontinence viagra – https://genericviagrarcp.com

    DavidBoins
    Terenceemuse
    Victorphemn

  48. Your comment is awaiting moderation.

    Regards. I value it!

    viagra cheap pharmacy teenagers viagra
    generic viagra 100mg
    connecticut generic caverta viagra – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  49. Your comment is awaiting moderation.

    Thanks a lot, I like this.

    viagra result videos viagra alert
    viagra 100mg
    women who like men taking viagra – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  50. Your comment is awaiting moderation.

    Regards. I enjoy it!

    viagra perscriptions viagra add
    viagra for sale uk
    viagra online overnight – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  51. Your comment is awaiting moderation.

    Fantastic info. Many thanks!

    viagra enjoyable to women google viagra
    viagra for women
    hugh hefners viagra supply – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  52. Your comment is awaiting moderation.

  53. Your comment is awaiting moderation.

    Very good facts. Regards.

    viagra hong kong viagra cialis levitra online candian
    cheap viagra
    richard molinare viagra commercials – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  54. Your comment is awaiting moderation.

    You’ve made your point very effectively!!

    effective time for viagra order viagra prescription
    viagra without a doctors prescription
    viagra boner – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  55. Your comment is awaiting moderation.

    This is nicely expressed! .

    what do you use after viagra under arm viagra
    generic viagra 100mg
    message board for viagra – https://genericviagrarcp.com

    DavidBoins
    Terenceemuse
    Victorphemn

  56. Your comment is awaiting moderation.

    Good forum posts. Regards!

    ladies viagra viagra mtab
    viagra 100mg
    canada pharmacy chewable viagra – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  57. Your comment is awaiting moderation.

    Terrific facts. Many thanks!

    viagra in manchester uk viagra twice
    cheap viagra
    long term efffects of viagra – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  58. Your comment is awaiting moderation.

    Many thanks, Valuable information.

    generic viagra capsules hebal viagra
    buy viagra online
    viagra and affiliate – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  59. Your comment is awaiting moderation.

    You made your point.

    topical viagra oil free viagra samples online
    generic viagra online
    names for generic viagra – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  60. Your comment is awaiting moderation.

    Amazing content, Regards.

    female viagra tablets cheap high blood pressure and viagra
    viagra pills
    viagra bet price – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  61. Your comment is awaiting moderation.

    Nicely put. Thank you!

    female viagra type drug viagra cheapest prices
    buy generic viagra
    rosacea viagra – https://genericviagrantx.com

    DavidBoins
    Terenceemuse
    Victorphemn

  62. Your comment is awaiting moderation.

    Perfectly voiced truly. .

    viagra spot pub how does viagra affect blood pressure
    viagra for women
    viagra seeing blue – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

  63. Your comment is awaiting moderation.

  64. Your comment is awaiting moderation.

  65. Your comment is awaiting moderation.

    Beneficial content. Kudos!

    acheter viagra viagra uk
    generic viagra 100mg
    viagra what to know – https://genericviagramsl.com

    DavidBoins
    Terenceemuse
    Victorphemn

Leave a Reply

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