Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > CommandArgument & CommandName

Reply
Thread Tools

CommandArgument & CommandName

 
 
RN1
Guest
Posts: n/a
 
      09-10-2008
Suppose I have a LinkButton whose Text is the name of a user (which is
being retrieved from a database). What I want is when I click this
LinkButton, I want the e-mail id of the user (which will be again
retrieved from the database). Now I can set the CommandArgument
property as well as the CommandName property of the LinkButton to the
e-mail id to achieve this.

So what difference does it make whether I use the CommandArgument or
the CommandName property of the LinkButton to do this? In other words,
what is the difference between CommandArgument & CommandName?

Thanks,

Ron
 
Reply With Quote
 
 
 
 
sloan
Guest
Posts: n/a
 
      09-10-2008

I guess at the end of the day, they're just strings being passed in.

...

Of course, logically a "Argument" makes more sense for the person(id) or
person's email.

And if someone is ever going to look at your code, then don't do something
weird.
Stick with convention.


If you've ever said (while looking at someone elses code) "Who's the
brainiac who did this?"...then don't break the normal convention.

.......




"RN1" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Suppose I have a LinkButton whose Text is the name of a user (which is
> being retrieved from a database). What I want is when I click this
> LinkButton, I want the e-mail id of the user (which will be again
> retrieved from the database). Now I can set the CommandArgument
> property as well as the CommandName property of the LinkButton to the
> e-mail id to achieve this.
>
> So what difference does it make whether I use the CommandArgument or
> the CommandName property of the LinkButton to do this? In other words,
> what is the difference between CommandArgument & CommandName?
>
> Thanks,
>
> Ron



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CommandName and CommandArguments not persisting in TemplateField ChemFinder ASP .Net 0 03-31-2006 11:44 PM
use Formview cancel commandname to return to GridView Page? =?Utf-8?B?RGFiYmxlcg==?= ASP .Net 4 03-20-2006 06:25 PM
Trigger CommandName from DropDownList in GridView Irfi ASP .Net 0 12-15-2005 04:58 PM
Trigger CommandName from DropDownList in GridView Irfi ASP .Net 0 12-15-2005 04:58 PM
asp:linkbutton - commandname behaviour John Blair ASP .Net 2 12-30-2004 05:04 PM



Advertisments