Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > ASP.NET 2.0 Link Button & Runtime Click Handler

Reply
Thread Tools

ASP.NET 2.0 Link Button & Runtime Click Handler

 
 
JumpingMattFlash
Guest
Posts: n/a
 
      08-11-2006
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!

--
=============
VB .NET Developer
http://www.rocketscience.uk.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to fire both event button click and textchanged when button is click and text is changed Amy ASP .Net 0 06-01-2006 02:33 PM
image button click event fires before click event of button Purvi T ASP .Net 0 10-19-2004 06:19 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Building Controls 1 05-28-2004 06:23 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net 2 05-25-2004 11:45 PM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Datagrid Control 0 05-25-2004 01:45 AM



Advertisments