使用gridview中作为数据绑定存在的“链接"按钮显示html表. [英] Displaying html table using Link button present in gridview as databound..
本文介绍了使用gridview中作为数据绑定存在的“链接"按钮显示html表.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我有以下代码:
Dear All,
I have the following code:
<Columns>
<asp:TemplateField HeaderText="Mobile Number">
<ItemStyle width="50px" HorizontalAlign="Center"
VerticalAlign="Middle" /> <ItemTemplate> <asp:LinkButton Text='<%#DataBinder.Eval(Container.DataItem,"MobileNo") %>' runat="server" CommandName="MobileNo" OnClick="tbl"/></ItemTemplate> </asp:TemplateField>
<asp:BoundField HeaderText="Barcode" DataField="Barcode" > <HeaderStyle HorizontalAlign="Left" />
<ItemStyle Height="25px" HorizontalAlign="Left" /> </asp:BoundField>
<asp:BoundField HeaderText="User" DataField="UserName" > <HeaderStyle HorizontalAlign="Left" /& <ItemStyle Height="25px" HorizontalAlign="Left" /&g </asp:BoundField>
<asp:BoundField HeaderText="Audited On" DataField="AuditOn" >
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle Height="25px" HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField HeaderText="QC Status" DataField="Status" >
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle Height="25px" HorizontalAlign="Left" />
</asp:BoundField>
</Columns>
请查看链接按钮..我想在单击链接按钮时调用html表ID"tbl".
谁能给我一个主意...
关于
Please have a look at the link button.. I want to call the the html table id "tbl" on clicking the link button.
Can anyone please give me an idea...
Regards
推荐答案
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "MobileNo")
{
//code to call/display the html table.
}
}
这篇关于使用gridview中作为数据绑定存在的“链接"按钮显示html表.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文