服务端控件在客户端显示的最终样式

1.CheckBoxList 

<asp:CheckBoxList ID="CheckBoxList1" runat="server">
<asp:ListItem Text="1" Value="1" Selected="True" Enabled="false"></asp:ListItem>
<asp:ListItem Text="2" Value="2" ></asp:ListItem>
<asp:ListItem Text="3" Value="3" ></asp:ListItem>
</asp:CheckBoxList></td><td>

 

<table id="CheckBoxList1">

<tr><td><span class="aspNetDisabled">

<input id="CheckBoxList1_0" type="checkbox" name="CheckBoxList1$0" checked="checked" disabled="disabled" value="1" />

<label for="CheckBoxList1_0">1</label>

</span></td></tr>

<tr><td><span>

<input id="CheckBoxList1_1" type="checkbox" name="CheckBoxList1$1" value="2" />

<label for="CheckBoxList1_1">2</label>

</span></td></tr>

<tr><td><span><input id="CheckBoxList1_2" type="checkbox" name="CheckBoxList1$2" value="3" />

<label for="CheckBoxList1_2">3</label>

</span></td></tr>
</table>

 

2.DropDownList

<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Text="1" Value="8" Selected="True" Enabled="true" ></asp:ListItem>
<asp:ListItem Text="2" Value="9" ></asp:ListItem>
<asp:ListItem Text="3" Value="10" ></asp:ListItem>
</asp:DropDownList>

 

<select name="DropDownList1" id="DropDownList1">
<option selected="selected" value="8">1</option>
<option value="9">2</option>
<option value="10">3</option>
</select>

 

 3.LinkButton

<asp:LinkButton ID="LinkButton1" runat="server" >LinkButton</asp:LinkButton>

<a id="LinkButton1" href="javascript:__doPostBack('LinkButton1','')">LinkButton</a>

4.asp:TextBox 

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

<input name="TextBox1" type="text" id="TextBox1" />

 

5.GridView1

<asp:GridView ID="GridView1" runat="server">
</asp:GridView>

 

<div> 

<table cellspacing="0" rules="all" border="1" id="GridView1" style="border-collapse:collapse;">
<tr>
<th scope="col">name</th><th scope="col">age</th>
</tr>

<tr>
<td>sfdsewasdf</td><td>12</td>
</tr>

<tr>
<td>fhggt</td><td>43</td>
</tr>

</table>
</div>

 

6.Repeater

<asp:Repeater id="cdcatalog" runat="server">

<HeaderTemplate>
<table border="1" width="100%">
<tr>
<th>Name</th>
<th>Age</th>
</tr>
</HeaderTemplate>

<ItemTemplate>
<tr>
<td><%#Eval("name")%></td>
<td><%#Eval("age")%> </td>

</tr>
</ItemTemplate>

<FooterTemplate>
</table>
</FooterTemplate>

</asp:Repeater>

 

<table border="1" width="100%">
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>sfdsewasdf</td>
<td>12 </td>
</tr>
<tr>
<td>fhggt</td>
<td>43 </td>
</tr>
</table>

转载于:https://www.cnblogs.com/bfy-19/archive/2012/04/24/2467944.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值