应某人要求,简单写一下
这里用DataList举个例子:
如html代码如下:
1 <asp:DataList ID="dlstClubTheme" runat="server" RepeatColumns="2" RepeatLayout="table">
2 <ItemTemplate>
3 <asp:Label ID="lbLogoPath" runat="server" Style="display: none;" Text='<%# Eval("LogoPath") %>'></asp:Label>
4 <span style="padding: 5px;">
5 <img class="lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-original="<%# Eval("Thumbnail") %>" width="320" height="63" alt="<%# Eval("Description") %>" /></span><br />
6 <input id="rbtnClubTheme" type="radio" name="rbtnClubTheme" value='<%# Eval("LogoPath") %>' />
7 <%# Eval("Name") %>
8 </ItemTemplate>
9 </asp:DataList>单选框是rbtnClubTheme这个,关键点在于,把你想操作的东西,绑定到value去
后台取值操作如下:
string LogoPath = Request["rbtnClubTheme"];
打完..收工...
共同学习,写下你的评论
评论加载中...
作者其他优质文章