gpt4 book ai didi

asp.net - 如何将回调函数分配给 asp :HyperlinkField?

转载 作者:行者123 更新时间:2023-12-02 15:03:12 25 4
gpt4 key购买 nike

我希望人们单击链接(从 asp:HyperlinkField 生成)并让它调用服务器上的方法,而不是将用户重定向到某个地方。有人知道该怎么做吗?

谢谢,
马特

最佳答案

我会使用 asp:CommandField 或 asp:ButtonField 来代替,并使用 ButtonType=Link - 这看起来与链接字段相同,然后您可以在网格中处理 OnRowCommand 事件来运行代码。

关于asp.net - 如何将回调函数分配给 asp :HyperlinkField?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1050847/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com