<%@ Page Language="C#" AutoEventWireup="true"%>
<!DOCTYPE html>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
RadioButtonList1.Items.Add(new ListItem("Northern Mockingbird", "1"));
RadioButtonList1.Items.Add(new ListItem("Gray Catbird", "2"));
RadioButtonList1.Items.Add(new ListItem("Sage Thrasher", "3"));
RadioButtonList1.Items.Add(new ListItem("Socorro Mockingbird", "4"));
RadioButtonList1.Items.Add(new ListItem("Brown Thrasher", "5"));
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>asp.net radiobuttonlist vertical alignment</title>
<style type="text/css">
.radiobuttonlist {
}
.radiobuttonlist td{
border:1px solid green;
height:50px;
vertical-align:bottom;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:MidnightBlue; font-style:italic;">
asp.net example - radiobuttonlist vertical alignment
</h2>
<hr width="550" align="left" color="Gainsboro" />
<asp:Label
ID="Label1"
runat="server"
Font-Size="Large"
Width="350"
Text="radiobuttonlist vertical alignment bottom"
>
</asp:Label>
<br /><br />
<asp:RadioButtonList
ID="RadioButtonList1"
runat="server"
RepeatDirection="Vertical"
AutoPostBack="true"
RepeatLayout="Table"
CssClass="radiobuttonlist"
>
</asp:RadioButtonList>
</div>
</form>
</body>
</html>
<!DOCTYPE html>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
RadioButtonList1.Items.Add(new ListItem("Northern Mockingbird", "1"));
RadioButtonList1.Items.Add(new ListItem("Gray Catbird", "2"));
RadioButtonList1.Items.Add(new ListItem("Sage Thrasher", "3"));
RadioButtonList1.Items.Add(new ListItem("Socorro Mockingbird", "4"));
RadioButtonList1.Items.Add(new ListItem("Brown Thrasher", "5"));
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>asp.net radiobuttonlist vertical alignment</title>
<style type="text/css">
.radiobuttonlist {
}
.radiobuttonlist td{
border:1px solid green;
height:50px;
vertical-align:bottom;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:MidnightBlue; font-style:italic;">
asp.net example - radiobuttonlist vertical alignment
</h2>
<hr width="550" align="left" color="Gainsboro" />
<asp:Label
ID="Label1"
runat="server"
Font-Size="Large"
Width="350"
Text="radiobuttonlist vertical alignment bottom"
>
</asp:Label>
<br /><br />
<asp:RadioButtonList
ID="RadioButtonList1"
runat="server"
RepeatDirection="Vertical"
AutoPostBack="true"
RepeatLayout="Table"
CssClass="radiobuttonlist"
>
</asp:RadioButtonList>
</div>
</form>
</body>
</html>
No comments:
Post a Comment