views:

398

answers:

1

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

A: 

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.

Lance Harper