473,385 Members | 1,483 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,385 software developers and data experts.

adding webcontrol button attributes

how can I call javascript function by adding button's attribute such as "onclick" in the code behind file as ".aspx.vb"

I have written code as Draw_line.Attributes("Onclick")="javascript:

where DrawLine is the name of the button

please help me
Nov 18 '05 #1
1 2240
Hi,

The correct sintax is:

DrawLine.Attributes.Add("OnClick", "javascript:myCode");

HTH,
Stefano Mostarda MCP
Rome Italy

anoop wrote:
how can I call javascript function by adding button's attribute such as "onclick" in the code behind file as ".aspx.vb"

I have written code as Draw_line.Attributes("Onclick")="javascript:

where DrawLine is the name of the button

please help me

Nov 18 '05 #2

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

Similar topics

4
by: Rob Meade | last post by:
Hi all, I'm desperately trying to get this to work and I just cant do it - new to ASP.net - probably the reason! I'm using visual studio for this - I have this in the html page : <asp:Table...
0
by: anoop | last post by:
how can I call javascript function by adding button's attribute such as onclick in the code behind file as ".aspx.vb" I have written code as Draw_line.Attributes("Onclick")="javascript: where...
4
by: Joe | last post by:
I have an xml file which looks similar to this: <data> Please enter the value: <dynamicControl id="myDC", type="Textbox", MaxLength="100"/> </data> I am trying to devise a way to have a web...
3
by: J'son | last post by:
Guys, I have created a custom class that derives from DataList so that I can add some custom client side functionality into each new item row (<td>). Heres the class in its simplest form: ...
0
by: Demetri | last post by:
I have created a web control that can be rendered as either a linkbutton or a button. It is a ConfirmButton control that allows a developer to force a user to confirm if they intended to click it...
0
by: Dariusz Tomon | last post by:
Hi I have got the problem with web control displaying flash (swf) object. The problem is connected with the fact that 1-st swf should loads the second one. But it doesn't. That's why I suspects...
3
by: Guillaume Hanique | last post by:
Hi, I feel very stupid. I simply want to derive a control from system.web.ui.webcontrols.button and use that on my webform, but I just can't get it done. Can anyone tell me how to do that? I...
2
by: =?Utf-8?B?Sm9yZ2UgUmliZWlybw==?= | last post by:
hello Inside a usercontrol i create a webcontrol button. I then render it onto a string on the usercontrol to built my UI I need to get access to that control Click event. To do so i try to bind...
0
by: Rene Goris | last post by:
Hi all, I am trying to add meta:resourcekey's to database programmatically looping throug webcontrols, but i cann't read the 'meta:resourcekey' from the webcontrol. The 'meta:resourcekey' will...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.