H
huzz
I'm trying to call a method from a datagrid, here is the HyperLinkColumn I
have in the DataGrid
<asp:HyperLinkColumn Text="Firstname" DataNavigateUrlField="ContactID"
DataNavigateUrlFormatString="javascript:__doPostBack('dosomething','{0}')"
DataTextField="Forename"
NavigateUrl="client_details.aspx"></asp:HyperLinkColumn>
also this at the top of the page.
<script type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform = document.client_details;
theform.__EVENTTARGET.value = eventTarget;
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
and in code-behind I have.
public void dosomething()
{
Response.Write("hello");
}
The problem is when I click the link on the datagrid nothing happens..
have in the DataGrid
<asp:HyperLinkColumn Text="Firstname" DataNavigateUrlField="ContactID"
DataNavigateUrlFormatString="javascript:__doPostBack('dosomething','{0}')"
DataTextField="Forename"
NavigateUrl="client_details.aspx"></asp:HyperLinkColumn>
also this at the top of the page.
<script type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform = document.client_details;
theform.__EVENTTARGET.value = eventTarget;
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
and in code-behind I have.
public void dosomething()
{
Response.Write("hello");
}
The problem is when I click the link on the datagrid nothing happens..