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

Event doesn't launch in ASCX control

Hi all. I'm using VS2005 Beta 2 and I encountered a problem with an event.

I had a User Control with a DataGrid with a CheckBox column like that:

<asp:TemplateColumn>
<ItemTemplate>
<asp:CheckBox AutoPostBack="false" ID="chkSel"
runat="server" EnableViewState=true
OnCheckedChanged="HtmlCheckBox_ServerChange" />
</ItemTemplate>
</asp:TemplateColumn>

It was working properly, but I had to include that DataGrid in other user
control, that I registered in the previous user control. Now, the event
doesn't run.

Is there any problem nesting user controls?
Nov 19 '05 #1
3 1043
Well first thing that caught my eye was this - AutoPostBack="false"

but also - your user control, if you're adding it to your page
dynamically make sure you do it in the OnInit not in the Page_Load

Nov 19 '05 #2

<ki********@gmail.com> escribió en el mensaje
news:11**********************@o13g2000cwo.googlegr oups.com...
Well first thing that caught my eye was this - AutoPostBack="false"

but also - your user control, if you're adding it to your page
dynamically make sure you do it in the OnInit not in the Page_Load


Thank you for posting.

The AutoPostBack=false is to avoid continuously loads in the page that can
disturb the user, so I wait until the user changes the page or clicks a
button.

The question here is that before using another control inside the main
control, it worked perfectly. It seems to be any limitation with that.

--
Regards,

Diego F.


Nov 19 '05 #3
So you are sticking this control inside of a user control and then
dragging and dropping it onto your aspx page?

or are you adding it to your page dynamically use Page.LoadControl? If
so you need to do that before page_load so your events will work
correctly

Nov 19 '05 #4

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

Similar topics

3
by: Tim Thomas | last post by:
Hi, I am very new to .NET and am in the process of building my first web application. I will briefly describe what i am trying to achieve: I have a system where suppliers register their...
0
by: Thanh Nguyen | last post by:
Hi everyone, I'm encountering a very weird problem, I have spent the last 3 days trying to figure out how to fix but there is still no clue. Here is the problem: I define 2 WebUserControls: -...
5
by: kw | last post by:
My aspx dynamically loads an ascx into a placeholder. The ascx has an event. When I click on the submit linkbutton in the ascx, the event does not fire. But if I click it a second time, it...
0
by: Tonix | last post by:
This problem was originated by Thanh Nguyen. Your help is appreciated. Thanks. The original text is: Hi everyone, I'm encountering a very weird problem, I have spent the last 3 days trying to...
0
by: ab_j | last post by:
I have a user control that contains a dropdown which I want to use as a menu on multiple .aspx pages. Basically, all I am trying to do is pass the selected value of the dropdown in the user...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
5
by: rn5a | last post by:
Consider the following user control which resides in Address.ascx: <script runat="server"> Public Property Address() As String Get Address = txtAddress.Text End Get Set(ByVal value As String)...
4
by: tshad | last post by:
I am just getting started with events and had a couple of questions on why they do what they do. If you have a textbox and you want to handle an event you can just do: ...
6
by: tshad | last post by:
I was looking at a page that showed how to set up a custom event and it seems to work ok. But I am not sure how I would use it. How would I subscribe to it. There is actual action (such as...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
0
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
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...

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.