从javascript调用vb链接按钮的(在用户控件内)click事件 [英] Calling a vb linkbutton’s(within a user control) click event from javascript
问题描述
我该如何调用VB函数-从usercontrol.ascx中clickhandler(e)中的javascript函数中的usercontrol.ascx.vb中的deleteevent().该呼叫应引起回发,因为我需要用户控件来显示更改.
我目前正在尝试通过使用样式为display:none的链接按钮并通过javascript函数调用其click事件来做到这一点.但是我不知道如何调用点击事件.
我不得不通过javascript将值传递给vb函数,但是我正在使用hiddenfield来处理它.
环境是asp.net 3.0语言:vb
谢谢.
KK
尝试查看__doPostBack函数,ASP.NET使用该函数在链接按钮和其他控件上触发回发,但是可以从任何其他JavaScriptcript函数中使用./p>
可以在此处找到关于该主题的出色文章.
how can i call a VB function - deleteevent() in usercontrol.ascx.vb from a javascript function in clickhandler(e) in usercontrol.ascx. The call should cause a postback because i need the usercontrol to display the changes.
i am currently trying to do it by using a linkbutton with style display:none, and calling its click event from the javascript function. But i dunno how to call the click event.
i had to pass a value to the vb function from the javascript, but i am taking care of it using a hiddenfield.
the environment is asp.net 3.0 language:vb
thanks.
KK
Try looking at the __doPostBack function which is what ASP.NET uses to fire postbacks on linkbuttons and other controls, but can be used from any other JavaScriptcript function.
A good article on the topic with examples can be found here.
这篇关于从javascript调用vb链接按钮的(在用户控件内)click事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!