复制代码 代码如下:
View Code
private Dictionary<int, string> GetData()
{
Dictionary<int, string> dic = new Dictionary<int, string>();
int i = 0;
System.IO.FileInfo fi;
var Images =
from f in System.IO.Directory.GetFiles(Server.MapPath("MsSiteImages"))
orderby f descending
select f;
foreach (var filename in Images)
{
fi = new System.IO.FileInfo(filename);
dic.Add(i, "<img src='" + "MsSiteImages/" + fi.Name + "' + fi.Name +
"' + fi.Name + "'/>");
i++;
}
return dic;
}
复制代码 代码如下:
<asp:RadioButtonList runat="server"></asp:RadioButtonList>
复制代码 代码如下:
private void Data_Binding()
{
Insus.NET.InsusListControlUtility objList = new Insus.NET.InsusListControlUtility();
objList.RadioButtonListParse(this.RadioButtonList1, GetData(), "value", "key");
}
复制代码 代码如下:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
Data_Binding();
}
新闻热点
疑难解答
图片精选