473,804 Members | 4,269 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CheckChanged inside my user control

hey all,
i'm trying to abstract some code from my current code-behind into a user
control. There's a CheckChanged event from a radiobuttonlist and i was
wondering if i could expose that from the user control or would it be easier
to do something else?

thanks,
rodchar
Nov 6 '07 #1
2 1168
You create a "CheckChang ed" event in the UserControl, then handle the
RadioButtonList CheckChanged event raised by the child Control by raising
the new "CheckChang ed" event in the UserControl. Other sibling Controls can
then handle the UserControl's event.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"rodchar" <ro*****@discus sions.microsoft .comwrote in message
news:7A******** *************** ***********@mic rosoft.com...
hey all,
i'm trying to abstract some code from my current code-behind into a user
control. There's a CheckChanged event from a radiobuttonlist and i was
wondering if i could expose that from the user control or would it be
easier
to do something else?

thanks,
rodchar

Nov 6 '07 #2
Thanks Kevin, I appreciate it.
rod.

"rodchar" wrote:
hey all,
i'm trying to abstract some code from my current code-behind into a user
control. There's a CheckChanged event from a radiobuttonlist and i was
wondering if i could expose that from the user control or would it be easier
to do something else?

thanks,
rodchar
Nov 6 '07 #3

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

Similar topics

3
1661
by: DC Gringo | last post by:
I've got a web user control (a) inside a web user control (b) inside a webform (c). I need the webform to set a label control text value inside the inner of the two web user control. Inside my web form's code behind I have: mainHeader1.sectionHeader1.theSectionHeader.text = "Eritrea" I'm getting "mainHeader1 is not declared" error. What am I doing wrong?
0
844
by: Chris | last post by:
I got a group of radio buttons on a form. Some of them I want to post back to the server and some I don't, so some have got AutoPostBack set to true and others false. The problem is when a user selects a client side radio button then goes back to the autoPostback one originally selected when the form loaded. This causes the postback but the CheckChanged event isn't fired because ASP.Net doesn't know about the client side changes. What...
8
3030
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the way I'm going about doing this might be a little off. I'd appreciate some help. Below is the code I have thus far but I'm not sure how to reference the user control within the foreach loop. <asp:Panel ID="pnlRosterProfile" runat="Server" />
0
3444
by: davidr | last post by:
Hi, I have a panel that I load user Control in no problem. The problem arrises when I do a post back on one of these user controls. I have button it does a click event. In this click event I will do some database updates, then I will use reflection to call a method in the parent (this.page) to load the new user control. Its at this point after it loads the new user control that it throws the error "The control must be placed inside...
1
5036
by: japi | last post by:
Hi all, I have a TreeView control in my ASP.NET 2.0 Web application with checkboxes enabled. I would like to generate a postback when a user ticks or unticks a checkbox. As far as i know, this is not possible out of the box. Does anyone have a solution/workaround/hack for this?
2
1563
by: | last post by:
I want to use codebehind to pass property values to a control that I've embedded INSIDE of a user control. In other words, let's say I have the following: MyPage.aspx ....with the following control placed on it... MyUserControl.ascx .... and inside of MyUserControl.ascx, is an instance of .... MyCommercialUploadControl1
2
2324
by: ccbalapatel | last post by:
Hi, We have recently converted our code to ASP.NET 2.0. We have an user control that is embedded inside the page. The user control has a link button and the event handler for the link button is written inside the user control. When the link button is clicked, the page is posted back and the page_load method of the user control also executes fine. But, the event handler for the link button is not called. The same code works fine on ASP.NET...
2
21055
by: =?Utf-8?B?UmljaA==?= | last post by:
Is there a cancel argument for cancelling if you want to check or uncheck a checkbox? In the checkChanged event of a checkbox I ask the user if they are sure they want to check/uncheck something. If No, I want to cancel the check or uncheck and cancel the click event. Right now I have a form level boolean checkvar that I set based on the user's response. If No then when entering the click event I don't perform various actions. Is...
0
1545
by: Emma Middlebrook | last post by:
Hi there, I'm having problems in an ASP.NET page that is dynamically creating and displaying radio buttons. I have setup a checkchanged event and specified AutoPostBack to true. When the page loads none of the radio buttons are checked by default. When the user checks the first one, the page refreshes but the checkchanged event never triggers. If you then select a different radio button, the postback occurs but the event also triggers.
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10575
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
10330
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
9144
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7616
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6851
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
5520
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
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.