Working on Web Parts Controls in ASP.Net
The code for this is:
<asp:WebPartZone ID="WebPartZone1" runat="server" Height="69px" Width="411px">
<ZoneTemplate>
<asp:RadioButton ID="RadioButton1" runat="server" title="Select Mca Student"
Text="MCA"/>
<asp:RadioButton ID="RadioButton2" runat="server" title="Select Mba Student"
Text="MBA"/>
</ZoneTemplate>
</asp:WebPartZone>
Give the text as Courses.
The code for this is:
<asp:WebPartZone ID="WebPartZone2" runat="server" Height="58px" Width="401px">
<ZoneTemplate>
<asp:Label ID="Label1" runat="server" Text="Label" title="Student Content"><h2>Courses</h2></asp:Label>
</ZoneTemplate>
</asp:WebPartZone>
Program:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="webpart.aspx.cs" Inherits="webpart" %>
<html>
<head runat="server">
<title>Aryan Computers, Barshi</title>
<style type="text/css">
.style1
{
width: 100%;
}
.style2
{
width: 265px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:WebPartManager ID="WebPartManager2" runat="server">
</asp:WebPartManager>
</div>
<table class="style1">
<tr>
<td class="style2">
<asp:WebPartZone ID="WebPartZone1" runat="server">
<ZoneTemplate>
<asp:RadioButton ID="RadioButton2" runat="server" Height="32px"
title="Select Mca Student" Text="MCA" />
<asp:RadioButton ID="RadioButton1" runat="server"
style="margin-right: 189px; margin-top: 0px;" title="Select MBA Student"Text="MBA" Height="16px" Width="231px"/>
</ZoneTemplate>
</asp:WebPartZone> </td>
<td>
<asp:WebPartZone ID="WebPartZone2" runat="server" Title ="Select Course " Height="123px" Width="262px">
<ZoneTemplate>
<asp:Label ID="Label1" runat="server" Text="student Detail" Height="77px" Width="318px"> <h2> Cources </h2></asp:Label>
</ZoneTemplate>
</asp:WebPartZone>
</td>
</tr>
</table>
</form>
</body>
</html>
Output:
Comments
Post a Comment