我期待在ASP中繼器上設置排序。看我的中繼代碼:如何從javascript調用服務器端函數
<asp:Repeater runat="server" ID="RptClientDetails">
<HeaderTemplate>
<table id="example" class="dynamicTable table table-striped table-bordered table-primary">
<thead>
<tr>
<th>
<a href="#" onclick="ClientSort('ClientID')">Client ID</a>
</th>
<th>
<a href="#" onclick="ClientSort('Name')">Name</a>
</th>
<th>
<a href="#" onclick="ClientSort('TotalBalanceDue')">Total Balance Due</a>
</th>
</tr>
</thead>
<tbody>
</HeaderTemplate>
<ItemTemplate>
這裏,我打電話給javascript函數。看到我的javascript功能代碼:
function ClientSort(SortExpress) {
<%= Sorting(SortExpress) %>
}
從這裏我想調用我的.net服務器端函數。
public void Sorting(string SortExpression)
{
string s = SortExpression;
}
所以,你有沒有想法我該怎麼稱呼它?或者直接從中繼器,我可以把這個服務器端function..Thanks
thx bro ...這正是我正在尋找的......:d – Kvadiyatar 2013-05-10 05:30:28