PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average.

Event doesn't launch in ASCX control

 
 
Diego F.
Guest
Posts: n/a
 
      7th Nov 2005
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?


 
Reply With Quote
 
 
 
 
kingadrock@gmail.com
Guest
Posts: n/a
 
      8th Nov 2005
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

 
Reply With Quote
 
 
 
 
Diego F.
Guest
Posts: n/a
 
      8th Nov 2005

<(E-Mail Removed)> escribió en el mensaje
news:(E-Mail Removed)...
> 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.




 
Reply With Quote
 
King Adrock
Guest
Posts: n/a
 
      8th Nov 2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ascx to Ascx Method Call Sylvie Microsoft C# .NET 2 26th Sep 2007 06:57 PM
Access ASCX properties/methods from another ASCX file djscratchnsniffing@yahoo.com Microsoft ASP .NET 5 13th Dec 2004 02:09 PM
Multiple *.ascx files with a single *.ascx.cs in VS.NET 2003 Holger (David) Wagner Microsoft ASP .NET 2 3rd Jul 2004 10:23 AM
can a dg be added to an ascx? ascx call a ws? Jason Shohet Microsoft ASP .NET 1 10th Nov 2003 08:08 PM
[ASCX] Add an ascx in a webcontrol... Quentin Microsoft ASP .NET 1 29th Jul 2003 08:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:36 AM.