views:

410

answers:

1

Hi, I am calling a javascript in the onclick event in ASP.NET sourcecode, as follows:

onclick='open popuplistitems("ct100$contentplaceholder..........")

Can you tell me how to do the same in vb.net ?

+1  A: 

Hi,

You could add the call to an attribute of a control.

Exmaple:

Create a Label in your Forms designer.

In Webform1's constructor OR in the Page_Load method:

Label.Attributes.Add("onclick", "javascript:window.alert('done by vb')")

At runtime, clicking on the label will execute the javascript call.

MoSlo