How to use WebParts Zone in the Asp.net
Step1:
Create a new Asp.net website in Visual Studio and write the following html code in the design part of the Default.aspx page.
Htmal Page :
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color: #0099FF">WebParts
Zone : Design</h2>
</div>
<div>
<asp:WebPartManager ID="WebPartManager1"
runat="server">
</asp:WebPartManager>
</div>
<div>
<asp:WebPartZone ID="WebPartZone1"
runat="server"
BackColor="Black"
ForeColor="White"
Font-Bold="True"
Font-Italic="True"
Font-Size="Large"
>
<MinimizeVerb ImageUrl="~/Images/Minimize-32.png"
/>
<RestoreVerb ImageUrl="~/Images/Restore-32.png"/>
<CloseVerb Visible="false"
/>
<ZoneTemplate>
<asp:Image
ID="Image1"
runat="server"
ImageUrl="~/Penguins.jpg"
Title="Penguin" Height="300px" Width="500px" />
</ZoneTemplate>
</asp:WebPartZone>
</div>
</form>
</body>
</html>
Step2:
Now build the Solution and Debug it for the output.
No comments:
Post a Comment