リピーターを使用してデータをバインドしています & ヘッダーテンプレートで、列の並べ替えにイメージボタンを使用しています。
私のクライアント側のコード:
<asp:Repeater runat="server" ID="RptClientDetails" OnItemDataBound="RptClientDetails_ItemDataBound">
<HeaderTemplate>
<table id="example" class="dynamicTable table table-striped table-bordered table-primary">
<thead>
<tr>
<th>
Client Name
<asp:ImageButton runat="server" ID="ImgbtnNameUp" ImageUrl="~/Images/BlackUp.png"
OnCommand="lbtnSortingAccending_Click" CommandArgument="Name" Height="15px" Width="20px" />
<asp:ImageButton runat="server" ID="ImgbtnNameUpDown" ImageUrl="~/Images/BlackDown.png"
OnCommand="lbtnSorting_Click" CommandArgument="Name" Height="15px" Width="20px" />
</th>
<th>
Total Balance Due
<asp:ImageButton runat="server" ID="ImgbtnTotalBalanceDueUp" ImageUrl="~/Images/BlackUp.png"
OnCommand="lbtnSortingAccending_Click" CommandArgument="TotalBalanceDue" Height="15px"
Width="20px" />
<asp:ImageButton runat="server" ID="ImgbtnTotalBalanceDueDown" ImageUrl="~/Images/BlackDown.png"
OnCommand="lbtnSorting_Click" CommandArgument="TotalBalanceDue" Height="15px"
Width="20px" />
</th>
</tr>
</thead>
<tbody>
</HeaderTemplate>
<ItemTemplate>
C# コード:
protected void lbtnSorting_Click(object sender, CommandEventArgs e)
{
string sortExpression = e.CommandArgument.ToString();
List<ARDTO> SirtlingListOBj = (List<ARDTO>)Session["GetClientList"];
int Showall = (int)Session["ShowAll"];
ImageButton imgBtnobj = new ImageButton();
imgBtnobj = (ImageButton)sender;
imgBtnobj.ImageUrl = "";
imgBtnobj.ImageUrl = "/Images/greenDown.png";
}
ここで ImageURl を変更したいのですが、うまくいきません。
ここで何が問題なのですか?
またはcssで変更できますか?