ASP.NET 2.0 Link Button & Runtime Click Handler

J

JumpingMattFlash

I'm currently creating a number of LinkButtons dynamically using information
from the database.

However I'm struggling to find out how i can react to the user clicking on
them. For some reason the onclick event handler is 'Protected'

I'm trying to use the following code but it will not compile due to the
underlined line

Dim LinkButton As New LinkButton
LinkButton.Text = LinkText


LinkButton.ID = "Unique Number"
LinkButton.CausesValidation =
False

LinkButton.CommandName = "Name of Parameter"

LinkButton.CommandArgument = "Parameter Value"
LinkButton.onclick = "ChangeOrg"


The annoying thing is that i can set the click event handler using the HTML
designer but not programmatically. If anyone has experienced this before and
can provide some assistance it will be gratefully recieved

Many thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top