Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一系列 ImageButtons...当我单击图像时,我想重定向到另一个页面,使用 CommandArgument 作为 uniqueId...如何从 onclick 事件中获取 commandArgument?谢谢!
不要使用 OnClick 事件。使用 OnCommand 事件
Protected Sub ImageButton1_Command(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs) Dim arg As String = e.CommandArgument.ToString() ' use arg End Sub