In the generated asp.net code from visual web developer 2010, I see the following code:
<%@ Control Language="C#" ClassName="Header" %>
<asp:Panel ID="Panel1" runat="server">
<img alt="xxx"
src="Images/bird.jpg"
width="800" height="110"/>
</asp:Panel>
<asp:Panel id="menuPanel" runat="server">
<a href="1.aspx">Home</a> |
<a href="2.aspx">Titles</a> |
<a href="3.aspx">Authors</a> |
<a href="4.aspx">Publishers</a>
</asp:Panel>
<%@
in
asp.net?<asp:Panel
?I see other examples, <asp:Button
<asp:Label
, etc.
Thank you
ASP.NET server instructions are enclosed by angled brackets: <% ... %>
; they tell ASP.NET to process their contents before sending a page to the client's browser.
@
identifies a directive, which do a variety of things but usually provide some instructions about what to do with the .aspx or .ascx file: Page
and Control
are two of the most commonly-used directives.
<asp:Panel>
is an ASP.NET WebControl. Web controls are server-side representations of HTML elements. They allow you to manipulate the page in a code-behind file that's executed on the server before being delivered to the client's browser.
For example, ASP.NET renders Panel
tags as <div>
elements, and renders Button
tags as <input>
elements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With