i want change style linkbutton row that the showing.
i want use this code , but keeps style before select linkbutton row after select other linkbutton row .
html codes:
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" OnItemCommand="Repeater1_ItemCommand">
<ItemTemplate>
<div id="div">
<asp:Panel runat="server" aID="pnl">
<asp:LinkButton runat="server" ID="lnkbtn" PostBackUrl='<%#"WebForm1.aspx?Id="+Eval("CategoryGalleryID")%>'
Text='<%#Eval("Title")%>'>
</asp:LinkButton>
</asp:Panel>
</div>
</ItemTemplate>
</asp:Repeater>
C# Codes:
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
string ID = Page.Request.QueryString.Get("ID");
LinkButton lnkbtn = (LinkButton)e.Item.FindControl("lnkbtn");
lnkbtn.Font.Bold= true;
}
Update: Use
Eg.:
I think you want to change the style of the selected LinkButton.
You can do that using CSS.
Eg.:
Check this for detail:
Styling Links