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
0
votes
2 answers

Passing CommandArguement to LinkButton from variable

I have seen many resources on SO that say that I can use following syntax to pass value to CommandArguement of `LinkButton' <%forearch(var comment in Comments){%>
Muhammad Adeel Zahid
  • 17,474
  • 14
  • 90
  • 155
0
votes
2 answers

Can we pass multiple eval field in one command argument in Repeater Control?

can we pass multiple eval field in one command argument. my code is here
KKDev
  • 141
  • 1
  • 3
  • 17
0
votes
1 answer

How to make the download image link work?

I have this code for my viewdepositslip.aspx wherein it shows the imageurls from the folder where the uploaded files are stored:
Paolo Duhaylungsod
  • 487
  • 1
  • 7
  • 25
0
votes
1 answer

CommandArguments not being passed to event handler in ASP.NET

This is a simple code, and not sure why CommandArgument is not being passed to my event handler. Here is my aspx code:
Kishor
  • 27
  • 2
0
votes
0 answers
0
votes
2 answers

ASP.NET button CommandArgument using <% %>

I have the following snippet of code in my .aspx file, I want the button to send the ID to the code behind. <%List CommentsList = FindNotes(ParentNote.ID); %> <%foreach (var comment in CommentsList) { %>
Tom smith
  • 670
  • 2
  • 15
  • 31
0
votes
1 answer

asp.net set command argument

I am using OnRowDataBound to automatically add a link button to my grid view that looks like this. The problem I am having is setting the command argument.
Laserchalk
  • 5
  • 1
  • 3
0
votes
2 answers

ASP: Repeater - pagination error (Object reference not set to an instance of an object)

im doing a pagination using repeater and im trying to change the color of the current page. Im getting the error "Object reference not set to an instance of an object". I cant debug what is wrong with my codes, so sorry because im a newbie to…
sd4ksb
  • 241
  • 1
  • 4
  • 16
0
votes
1 answer

Calling a Button's method with a CommandArgument

I'm not sure the title makes best sense. I'm trying to call a method which would usually be only accessible by direct clicks from the front page itself. However in one very particular instance I need to call this method the once, but as this method…
user2895432
0
votes
1 answer
0
votes
1 answer

Sorting a Foreign Key column in a Model Bound Listview

I'm using a Listview to display some data using model binding and I'm trying to sort a column in the listview that relates to a foreign key column in the data source, namely the book column. The Data Model is as follows: public class Book { …
0
votes
1 answer

asp.net button use javascript return function

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…
keyboardP
  • 68,824
  • 13
  • 156
  • 205
0
votes
0 answers

Passing a variable from aspx to .cs

I am trying to pass an Id from aspx to .cs. This is the code i have in the aspx:
0
votes
1 answer

delete buttons inside the gridview for each row

I have a gridview which contains buttons of delete and edit the row. I have this html code for the gridview:
7alhashmi
  • 924
  • 7
  • 24
0
votes
1 answer

ASP.net LinkButtion if then else

Hey all i have this piece of code here:
StealthRT
  • 10,108
  • 40
  • 183
  • 342