Unable to pass an argument from asp LinkButton to the javascript function I am calling it from OnClientClick.
This is what I have so far
<asp:LinkButton ID="LinkButton2" runat="server" Text='<%# Bind("Subject") %>' OnClientClick ="OpenViewMeeting(this); return false;" CommandName="Id" CommandArgument='<%# Bind("Id") %>' Width ="30%"/>
Javascript Function
<script type="text/javascript">
function OpenViewMeeting(Ob) {
var Id = Ob.CommandArgument;
alert(Id);
return false;
}
</script>
I can get the text of the button using "ob.text", so I know that "this" actually passes the LinkButton. However, I am trying to catch an argument from it and not the text. I need javascript for some further purpose, so I need to catch the argument there. Any help will be appreciated!