View Full Version : ext:Button CommandArgument

Jun 30, 2008, 6:06 PM
I use a click listener, autopostback is off for the ext:Button. Click listener is a client-side function. Is it possible in the client-side function to get not only id of the ext:Button, but also the CommandArgument?

... wrapped in templated asp:ListView ...
<ext:Button ID="btnDelete" runat="server" CommandName="DeleteItem" CommandArgument='<%# Eval("ID")%>' Text="Delete" Icon="Delete" StyleSpec="display:inline;vertical-align:middle;" AutoPostBack="False">
<Click Fn="doDelete" />
and client-side:

var doDelete = function(sender) {
val el = &#100;ocument.getElementById('<%= hiddenDeleteButton.ClientID %>');
-> here I need to add the onclick attribute to el for __dopostback with needed argument. How do I get the argument?

Thank you!