【发布时间】:2011-11-22 00:49:15
【问题描述】:
我对 Ajax 不熟悉。我正在使用执行的 webgrid:
javascript:__doPostBack('GridView1','Select$1')
选择行时。发布后如何调用某些操作?
____更新_______
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.DataItemIndex == -1)
return;
e.Row.Attributes.Add("onMouseOver",
"this.style.cursor='hand';");
e.Row.Attributes.Add("onclick",
GetPostBackClientEvent(GridView1,
"Select$" + e.Row.RowIndex.ToString())
);
}
【问题讨论】:
-
可能需要查看更多代码?肯定还有更多信息?
-
肯定的。发布 __doPostBack() 函数。
-
@AntarrByrd 您发布的 RowDataBound 代码正是生成此行的原因:
javascript:__doPostBack('GridView1','Select$1')
标签: javascript jquery ajax asp.net-3.5 webgrid