commandargument

Why is my CommandArgument Empty?

I have an ASP.Net page, which displays a list of options to the user. When they select from the list, it does a post back and queries a sql server. The results are displayed in a listview below the options in an update panel. Below is a snippet of the ItemTemplate: <asp:LinkButton Text="Save IT" OnCommand="SaveIt" CommandArgument="<%...

Access CommandEventArgs within PageLoad

Hello all, I am using c#.net I have a repeater within a View (MultiView) each row contains a ‘Edit’ button (stored on the CommandArgument is the type ID). <asp:Button ID="buttonClick" OnCommand="ButtonClick" CommandArgument='<%#Eval("ID")%>' runat="server" Text="Edit"/> When the user clicks on the ‘Edit’ button they are taken throu...

asp.net button use javascript return function

Hi, I have an asp:button control and am using the "CommandName" and "CommandArgument" parameters in the .aspx file. The CommandName is found with <%# Eval("Name") %>, but the CommandArgument has to be found via a javascript function. However, I'm not quite sure how to do this inline. The function returns a number (integer), which is t...

Passing multiple argument through CommandArgument of Button in Asp.net

I have a gridview with multiple rows, each has a Update button and I need to pass 2 values when someone clicks on Update button. Aside from packing the arguments inside CommandArgument separated by commas (archaic and not elegant), how would I pass more than one argument? <asp:LinkButton ID="UpdateButton" runat="server" CommandName="Up...

linkbutton oncommand issue

I am using 2 linkbuttons inside seperate dataitem server controls on my asp.net web page <asp:LinkButton ID="Item1" runat="server" CommandName="first" OnCommand="Item1_Onclick" CommandArgument="<%# Container.DataItem %`>" Text="<%# Container.DataItem %`>" > </asp:LinkButton`> and <asp:LinkButton ID="Item2" runa...

Property 'CommandArgument' is WriteOnly

I have the following line in my code, inside the click event handler of an ImageButton: Protected Sub FinaliseBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles FinaliseBtn.Click, SubmitPaymentViaChequeBtn.Click Dim str as String = sender.commandargument.ToString.ToLower End Sub Both Controls are ImageButton's. ...

asp.net repeater with usercontrol - setting commandargument

Hello I have the following repeater code: <asp:Repeater ID="repMain" runat="server" OnItemCommand="repMain_ItemCommand" EnableViewState="false"> <ItemTemplate> <dmg:testcontrol runat="server" MyData=<%#Container.DataItem %>> </dmg:testcontrol> </ItemTemplate> </asp:Repeater> The testcontrol usercontrol looks li...