Questions tagged [commandargument]

CommandArgument is a property of the Button class. CommandArgument is used to complement the CommandName property by allowing to provide additional information about the command to perform (e.g. if CommandName was "Sort", CommandArgument could be "Ascending").

79 questions
34
votes
7 answers

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…
sarsnake
  • 26,667
  • 58
  • 180
  • 286
32
votes
4 answers

How to pass multiple values through command argument in Asp.net?

I have ImageButton with CommandArgument attribute which is having multiple Eval value. When I click one of them I want to pass values to ImageButton2_Click event but it does not work because Command arguments is null.
leventkalay92
  • 573
  • 3
  • 11
  • 28
20
votes
4 answers

e.CommandArgument for asp button is not working

I am developing a asp.net application using C#. I created an .aspx page and placed four buttons on different locations on the page. On server side, I want to use just one click event for all four buttons. Here is my code: aspx page
liaqat ali
  • 241
  • 2
  • 3
  • 7
15
votes
3 answers

How to pass parameters to main method using Gradle?

I have to pass two arguments to my main method. My build script is // Apply the java plugin to add support for Java apply plugin: 'java' // In this section you declare where to find the dependencies of your project repositories { // Use 'maven…
Xelian
  • 16,680
  • 25
  • 99
  • 152
8
votes
3 answers

Debugging with "Command Arguments" in Visual Studio not working

VS not running WITH the "Command Arguments" I passed in. What am I not doing right? Trying to work with "Command Arguments" in Visual Studio. I broke it down to a simple little ConsoleApplication program in C. #include "pch.h" #include…
jdl
  • 6,151
  • 19
  • 83
  • 132
7
votes
3 answers

making commandargs comma delimited or parsing spaces

I'm trying to run R from the command line using command line arguments. This includes passing in some filepaths as arguments for use inside the script. It all works most of the time, but sometimes the paths have spaces in and R doesn't understand.…
6
votes
5 answers

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…
kevindaub
  • 3,293
  • 6
  • 35
  • 46
5
votes
1 answer

Find the selected value of a RadioButton inside a Lightbox that is inside a Repeater

I have a Repeater that contains a link labeled "Change Membership" that when clicked opens a lightbox with a radiobuttonlist and a button. When the button in the lightbox is clicked I have a callback event where I need to find the selected value of…
Lyle
  • 419
  • 1
  • 6
  • 26
4
votes
1 answer

How to send multiple command arguments through command button ?(RowCommand Event)

I'm Trying to send accross multiple command arguments when a rowcommand is called:
Pavitar
  • 4,282
  • 10
  • 50
  • 82
4
votes
1 answer

Wrong linkbutton command argument after sorting gridview

In an asp:TemplateField column of a GridView, I have a LinkButton that passes a command argument to a function that deletes the row when it is clicked. However, after the GridView is sorted, the LinkButton passes the wrong argument. Also, the…
dmr
  • 21,811
  • 37
  • 100
  • 138
4
votes
2 answers

Pass object as CommandArguement in a Repeater Link Button

I have a Repeater with a list of Customers. Against each customer there is a delete link button. As part of the linkbutton I want to pass the Customer object to the Command Arguement as follows (where Container.DataItem is the customer…
MikeL
  • 161
  • 1
  • 4
  • 8
3
votes
1 answer

Repeater Button CommandArgument is Empty String

Losing my mind with this one. My button gets a commandargument of empty string even though the commandargument gets set. I have verified it gets set to the correct ID in debug mode, but then when I go to access this commandargument later in the…
Howard Tucker
  • 438
  • 9
  • 18
3
votes
1 answer

linkbutton in a listview with a CommandArgument

I'm using VS 2010, vb.net, .net 4. I have a list view that holds a asp:linkbutton in an asp:tablecell. The problem is that the command argument is not the right value.
jvcoach23
  • 2,765
  • 10
  • 34
  • 50
2
votes
3 answers

C# Pass textbox content via CommandArgument in Repeater

<%#String.Format("{0:C}", Eval("Price"))%>


QTY…

ComfortablyNumb
  • 1,448
  • 10
  • 37
  • 64
2
votes
1 answer

Dynamically added ASP.Net Button could not call Click or CommandArgument event

I am adding x number of buttons to an asp.net web application. This is my code for doing so: int i = 0; foreach(var foo in bar){ Button b = new Button(); b.ID = "button" + i.ToString(); b.CommandName = "var_value"; b.CommandArgument…
Skettenring
  • 193
  • 1
  • 13
1
2 3 4 5 6