日期:2014-05-17 浏览次数:20489 次
protected void Page_Load(object sender, EventArgs e)
{
this.RadioButtonList1.Items[0].Selected = true;
}
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:RadioButtonList ID="RadioButtonList1" runat="server"
RepeatDirection="Horizontal" DataSourceID="SqlDataSource1"
DataTextField="test1" DataValueField="id"
ondatabound="RadioButtonList1_DataBound">
</asp:RadioButtonList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:sqlTestConnectionString %>"
SelectCommand="select id,'<img src=/1/'+url+'>' as test1 from Table_3"></asp:SqlDataSource>
</div>
</form>
</body>
</html>
protected void Page_Load(object sender, EventArgs e)
{
//RadioButtonList1.DataSource = TM.DBUtility.DbHelperSQL.GetDataTable("select id,'<img src=/1/'+url+'>' as test1 from Table_3");
//RadioButtonList1.DataTextField = "test1";
//RadioButtonList1.DataValueField = "id";
&