Application of LinkButton attributes in the GridView (how to delete this line without checking) _ Practical Tips
Source: Internet
Author: User
1, in the GridView has been "delete" is not very understanding, under the model of ASP, this deletion link should have a row ID identification, so that the program know to delete that line, or for this line to do some processing, but in the asp.net inside also can use, but not the best.
2, should use the various attributes of LinkButton, this time very aspect, and easy to understand. This does not have to select a row (Gridview.selectedrow provides positioning information), and then click on an operation.
Notice the correspondence between CommandName, CommandArgument and LinkButton's name CommandArgument.
With CommandName, you know it's the LinkButton control.
With CommandArgument (and row ID bindings), you know which line to process.
SWICTH (CommandName)
Case "Sort": {}
Case "Delete": {}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.