0

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
  • 1
    What is the difference between "asp.net source code" and VB.NET ? Is your source in C# ? If so, use an online converter. Commented May 8, 2009 at 9:01

1 Answer 1

1

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

Example:

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.