I have an app that, based on the .text property in a linkbutton (which is set programmatically, typically "Add" or "Save") the system adds or saves to the database. The linkbutton is standalone and not within a gridview or anything like that. Now the customer just wants to see "Save" in all cases, which invalidates my logic. I would prefer to use the app's existing logic as much as possible. Unfortunately the linkbutton doesn't have a property such as .nonvisibletext, so I'm wondering if it does have a property which I could put a string in that I don't use, and I'm looking at CommandName. I do use that in gridview processing, but not in linkbuttons. Can I safely use CommmandName instead of Text? Or is there is internal usage of this property? I'm not finding anything in research so far that indicates one way or the other. Thanks!
Asked
Active
Viewed 573 times
1 Answers
1
As per my knowledge, you can use the CommandName/Command Argument properties of the LinkButton without any problem. The only change would be that the "OnClick" event should be removed and "OnCommand" should be added.
Hope this Helps!!

Praveen
- 1,449
- 16
- 25
-
Thank you! I believe I'll try CommandArgument. The system seems to work correctly with it. – user542319 Oct 31 '12 at 17:53