2
리피터를 사용하여 데이터를 바인드합니다. & 헤더 템플릿에 정렬 버튼으로 imagebutton을 사용하고 있습니다.imagebutton 이미지 URL이 리피터에서 동적 변경되지 않았습니다.
내 클라이언트 측 코드 : C# 코드에
<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>
: 그래서 여기
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";
}
내가 이미지 URL을 변경하려면 ... 그러나 그것은 작동하지 않습니다 ... , 어떤 몸이라도 나를 도울 수 있습니다 ...
여기에 무슨 문제가 있습니까?
또는 CSS를 통해 변경할 수 있습니까?