Using Panel or PlaceHolder

前端 未结 5 591
迷失自我
迷失自我 2020-12-02 16:33

What is the difference between and in ASP.NET?

When should you use one over the other?

5条回答
  •  萌比男神i
    2020-12-02 16:59

    The Placeholder does not render any tags for itself, so it is great for grouping content without the overhead of outer HTML tags.

    The Panel does have outer HTML tags but does have some cool extra properties.

    • BackImageUrl: Gets/Sets the background image's URL for the panel

    • HorizontalAlign: Gets/Sets the
      horizontal alignment of the parent's contents

    • Wrap: Gets/Sets whether the
      panel's content wraps

    There is a good article at startvbnet here.

提交回复
热议问题