In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how to solve the problem of link and delete click prompt in Gridview. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
For example: Gridview has two columns: cancel and delete, click and prompt before execution.
The code is as follows:
If you bind the prompt like this in the background:
The code is as follows:
E.Row.Cells [6] .Attributes.add ("onclick", "return confirm ('are you sure you want to cancel?")
E.Row.Cells [7] .Attributes.add ("onclick", "return confirm ('are you sure you want to delete this data?)")
This is a cell binding event for Gridview. If you don't click on the text, just click on the cell where the text is located, and the prompt will pop up, which is very unfriendly.
Solution:
The code is as follows:
((HyperLink) e.Row.Cells [6] .controls [0]) .Attributes.Add ("onclick", "return confirm ('are you sure you want to cancel?'))
((LinkButton) e.Row.Cells [7] .controls [0]) .Attributes.Add ("onclick", "return confirm ('are you sure you want to delete this data?')")
This is the end of this article on "how to solve the problem of links and deleting clicks in Gridview". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.