473,796 Members | 2,708 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

onClick event for webcontrol

Hi there,

I would like to add an onClick event to a webcontrol which calls a function
which is in the code behind an not a javascript. Would that be possible?

Something like this:

MenuCase.Attrib utes.Add("onCli ck", MenuCase_Button Click());

private string MenuCase_Button Click()

thanks a lot

Chris
{
TextBox5.Text = "actually";
return null;
}


Nov 17 '05 #1
1 1670
Chris,
I would like to add an onClick event to a webcontrol which calls a
function
which is in the code behind an not a javascript. Would that be possible?

What is a webcontrol?

(I know a Serverside control and a HTML control)

Cor
Nov 17 '05 #2

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

Similar topics

1
2026
by: Jim Mitchell | last post by:
I added a toolbar and then added two images that the user can not click on. I double click on the toolbar in design mode and it does not seem to create any kind of OnClick Event. Can someone show me some sample code for the Toolbar's onclick event? Thanks in advance.
1
2128
by: Josema | last post by:
Hi to all, i have a web custom control(webcontrol1) that has a button(button1), another webcontrol(webcontrol2) that has a label (label1), and another webcontrol (webcontrol_all). in the webcontrol_all i make this steps: 1) i instanciate the button (protected webcontrol1 mywebcontrol = new webcontrol1) 2) i instanciate the second webcontrol(protected webcontrol2 mywebcontrol2 = new webcontrol2) 3) create the event Onclick...
2
5930
by: Novice | last post by:
I can't seem to get my Custom WebControl to output a button whose click event is associated with a particular method. Here is the code I have right now that contains a panel and there is a button in that panel that should be associated with a event method - but it isn't working: protected override void Render(HtmlTextWriter output) { Panel panel = new Panel(); nextButton = new Button();
0
1820
by: Novice | last post by:
Hey all, I've already posted this question and two posters offered suggestions and they worked - but now I would like to know why - and if possible the answer to a second question. Here is my problem: I am trying to write a custom WebControl - at some point this WebControl will output a bunch of controls into several Panel objects. But I just recently got my WebControl to output a single button and attach an event handler to that...
3
2408
by: Tarun Upadhyaya | last post by:
Hi, I am facing strange problem I read Scott mitchell's article about ASP.NET and javascript at http://www.msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/clientsidescript.asp where he has talked about creating a base class for displaying alerts and confirms after and before postbacks respectively. I used that Base class to inherit on of my code behind classes and and i
0
2980
by: CS | last post by:
Hi All, I have a treeview webcontrol ASP page which is dynamically created by C# code behind. After the treenodes are populated , I want to handle mouse onclick on individual onclick action. Then pass the content of that node to another asp page to be processed for that node contents then return back another page. How to do it? I am using .Net V2 and WebControl V1.0
3
5169
by: RKT | last post by:
(CSharp, NET2.0) Is there any way to EITHER: 1. Programmatically add a server onclick() event hander to the 'HtmlImage' HtmlControl control? OR 2. Programmatically preempt a 'Image' WebControl from invoking a postback?
5
13963
by: Stuart Shay | last post by:
Hello All I am working on ASP.NET 1.1 Custom Pager that allows a User to Enter a Number in a TextBox and go to the page selected. Since the OnClick Event does not work in ASP.NET 1.1 for a TextBox I want to use a hidden button to fire when the Onclick Event is fired for the TextBox.
3
5711
by: Tomasz J | last post by:
Hello Developers, How do create a custom WebControl (not UserControl), exposing OnClick event? I reviewed countless examples found by Google, but came across nothing helpful. Below I attach what I got so far. Thank you for any hints. Tomasz J
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10461
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10239
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10019
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6796
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4122
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.