CommandArgument & CommandName

R

RN1

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
 
S

sloan

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.

.......
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top