473,396 Members | 2,010 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,396 software developers and data experts.

create a click event for control in the code behind.

Hi,
I am writing in .net 1.1 asp.net program in c#.
In the code behind I declared a reference html control (frame):

Expand|Select|Wrap|Line Numbers
  1. HtmlControl rightFrame = (HtmlControl)mainFrame.FindControl("frmRight");
  2.  
Now I want to create a new "click" event for this control in the code behind.
This "click" is not "built in" .net.
I tried to use this code:
Expand|Select|Wrap|Line Numbers
  1. rightFrame.Click+= new System.EventHandler(this.oHTMLBodyRight_onclick);
  2.  
I get the message- "System.Web.UI.HtmlControls.HtmlGenericControl does not
contain definition to click"

what is the way to declare click event for the control - "rightFrame"
Any help, links will be appreciated!

Thanks in advance.

Nov 28 '06 #1
1 2273
someone please help, it is realy urgent...

"Niron kag" wrote:
Hi,
I am writing in .net 1.1 asp.net program in c#.
In the code behind I declared a reference html control (frame):

Expand|Select|Wrap|Line Numbers
  1. HtmlControl rightFrame = (HtmlControl)mainFrame.FindControl("frmRight");
  2.  

Now I want to create a new "click" event for this control in the code behind.
This "click" is not "built in" .net.
I tried to use this code:
Expand|Select|Wrap|Line Numbers
  1. rightFrame.Click+= new System.EventHandler(this.oHTMLBodyRight_onclick);
  2.  
I get the message- "System.Web.UI.HtmlControls.HtmlGenericControl does not
contain definition to click"

what is the way to declare click event for the control - "rightFrame"
Any help, links will be appreciated!

Thanks in advance.
Nov 28 '06 #2

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

Similar topics

2
by: George | last post by:
I'm having a weird problem. When I double-click a Web server control that I have on my design-time Web form, such as a button, it puts the event handler in the Code Behind as a Private Sub...
4
by: Carlo Marchesoni | last post by:
I have a button that opens a new Window (some kind of search-window), which is fired using JavaScript (btnSearch.Attributes=".....";) Now I need to run some code behind code BEFORE this JavaScript...
2
by: Eric Sabine | last post by:
I have code in my page_load event that definitely gets fired because I can step through it. But code wired to my button_click event isn't getting fired. The control is of type...
3
by: Mark | last post by:
This is a solution... Often users want to keep clicking "submit" when they are waiting for server processing. Most apps these days like to disable the submit button to prevent this. You can't just...
3
by: Imran Aziz | last post by:
Hello All, I have a search text and button that post data and my button handler filters the repeater control. However when the button is clicked the first time. The page_load event is being called...
6
by: shil | last post by:
I have a server side button that needs to do some preperation and afterwards, if everything goes well, open a new browser with a specific url. I know how to execute javascript from a server side...
4
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi, I have built a custom control button which inherits from WebControl and implements IPostBackEventHandler. The control also declares an event Click and provides a method OnClick which invokes...
1
by: MaryamSh | last post by:
Hi, I am creating a Dynamic Search in my application. I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove) By pressing Add button...
0
by: MaryamSh | last post by:
Create Dynamic Dropdownlist Controls and related event -------------------------------------------------------------------------------- Hi, I am creating a Dynamic Search in my application. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.