473,325 Members | 2,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

how to trigger event with HtmlInputButton?

Hi,

I created a HtmlInputButton in the code-behind of a asp.net application like
this:
Dim bt As HtmlInputButton
bt = New HtmlInputButton
bt.ID = "bt1"
frm.Controls.Add(bt)

But there is no 'click' or 'onclick' or 'onclientclick' property. I see it
but of course nothing happen when clicking on it.
How can i link a function in Javascript to that button.

Thanks
Britt
Oct 29 '06 #1
2 1585
Britt,

You just add an attribute to your button:
bt.Attributes.Add("onclick", "your_javascript")

HTH
"Britt" wrote:
Hi,

I created a HtmlInputButton in the code-behind of a asp.net application like
this:
Dim bt As HtmlInputButton
bt = New HtmlInputButton
bt.ID = "bt1"
frm.Controls.Add(bt)

But there is no 'click' or 'onclick' or 'onclientclick' property. I see it
but of course nothing happen when clicking on it.
How can i link a function in Javascript to that button.

Thanks
Britt
Oct 29 '06 #2
Thanks Sergey

"Sergey Poberezovskiy" <Se*****************@discussions.microsoft.com>
schreef in bericht
news:CA**********************************@microsof t.com...
Britt,

You just add an attribute to your button:
bt.Attributes.Add("onclick", "your_javascript")

HTH
"Britt" wrote:
>Hi,

I created a HtmlInputButton in the code-behind of a asp.net application
like
this:
Dim bt As HtmlInputButton
bt = New HtmlInputButton
bt.ID = "bt1"
frm.Controls.Add(bt)

But there is no 'click' or 'onclick' or 'onclientclick' property. I see
it
but of course nothing happen when clicking on it.
How can i link a function in Javascript to that button.

Thanks
Britt

Oct 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: R. Rajesh Jeba Anbiah | last post by:
I have Googled a lot, but couldn't still find the answer... I could see, I can trigger the "click" event like: button_object.Click() But, I need to trigger the onChange() of select options. I...
4
by: Peter Lin | last post by:
Dear all; I need to monitor a xml file so that I can update my data in hashtable, but the problem is it will trigger more than one event for a lastwrite action(I trigger this action by add...
2
by: Owin | last post by:
Hi all, I've created an User control. It's an extension of a textbox wich has some extra properties so that validation becomes a lot faster. The control wordks great if autopostback is on. When...
3
by: rmorvay | last post by:
I allow users to click a datagrid row and it spawns another browser page to allow edits to the data in that row. Once they update the data, it is committed to the database and the form is closed. ...
8
by: Frank van Vugt | last post by:
Hi, If during a transaction a number of deferred triggers are fired, what will be their execution order upon the commit? Will they be executed in order of firing or alfabetically or...
4
by: LyzH | last post by:
Someone else had a question on how to emulate a mouse click. I tried posting in that thread but I have something of a twist on this problem and I'm really in trouble here! If I don't get help...
6
by: wugon.net | last post by:
Hi , Anyone know how to monitor db2 trigger activity ? We suffer some trigger issue , and we try to monitor trigger's behavior use event monitor and db2audit, but both tools can not get...
0
by: wugon.net | last post by:
Hi , Anyone know how to monitor db2 trigger activity ? We suffer some trigger issue today and we try to monitor trigger's behavior use event monitor and db2audit, but both tools can not get...
0
by: =?Utf-8?B?bGl1eGluZmVpaHU=?= | last post by:
Hi, I use post way realization page postback this am must,How realizesunder the post way controls postback continuously to be unable to findthe solution the method to hope can obtain master's help...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.