I want to know what is difference between Panel
control in asp.net and div
with runat="server"
? Since both render as a div
.
Which one is best (conditions)?
The code
<asp:Panel id="abc" runat="server">
is exactly the same as if you do:
<div id="abc" runat="server">
They render the same, but it's the functionality with other WebControls that the Panel is most used, and the Panel web control gives you more control under code-behind as it exposes more properties.