DataGrid HyperLinkColumn

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..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top