Question

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!

Was it helpful?

Solution

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!!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top