I have server side event like this.
protected void RadTreeView1_ContextMenuItemClick(object sender, RadTreeViewContextMenuEventArgs e)
{
// implementation here.
}
I am trying to call it from client side javascript. I have tried __doPostBack("contextMenuItemID", "some string")
it posts the page back to server, but this does not invoke the original ContextMenuItemClick event. How can I invoke the original contextMenuItemClick event with proper event Args?
I have server side event like this.
protected void RadTreeView1_ContextMenuItemClick(object sender, RadTreeViewContextMenuEventArgs e)
{
// implementation here.
}
I am trying to call it from client side javascript. I have tried __doPostBack("contextMenuItemID", "some string")
it posts the page back to server, but this does not invoke the original ContextMenuItemClick event. How can I invoke the original contextMenuItemClick event with proper event Args?
Share Improve this question asked May 7, 2012 at 13:48 Manas SahaManas Saha 1,4979 gold badges29 silver badges45 bronze badges1 Answer
Reset to default 7You'll want to look at using the ClientScriptManager.GetPostBackEventReference method. This will create the correct javascript call ("__doPostBack") for the control/action using the ClientScriptManager (untested example):
<script type="text/javascript">
function callPostBack() {
<%= Page.ClientScript.GetPostBackEventReference(RadTreeView1, String.Empty) %>;
}
</script>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745226525a4617485.html
评论列表(0条)