Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Re: LoadControl problem


Message #1 by "Fredrik Normen" <fredrik.normen@e...> on Wed, 01 Nov 2000 09:52:57 +0100
Instead of using Page.LoadControl try to register it as an User control.



<%@ Register TagPrefix="My" TagName="MyControl" Src="mydatagrid.aspc" %>





....



<My:MyControl RUNAT="Server"/>



....



/Fredrik Normen



----- Original Message -----

From: "Telmo Sa" <telmo_sa@h...>

Date: Tuesday, October 31, 2000 2:41 pm

Subject: [aspx] LoadControl problem



> Hello all!

> I have a little problem concerning loading a aspx page into 

> another one.

> I have a ASP+ page that loads another as a control using the

> Page.LoadControl directive.

> The Control is a Page that has a DataGrid and its event handlers.

> It loads the page ok.

> In this DataGrid i have a EditColumn. When i click the Edit link 

> the event

> handlers are not called. The postback happens but the

> event handlers are not called.

> Has anyone had this problem?

> If i run the included page alone the datagrid events are caught!

> Thank you!!

> 

>    Telmo Sa

> 

Message #2 by "telmo sa" <telmo_sa@h...> on Wed, 01 Nov 2000 15:16:56 WET
Hi!

I have thought that, but for what i am trying to do, it wont work.

I am trying to dinamicaly build a page that is composed of diferent parts 

depending on the user choice ( a set of tabs ).

I saw a similar example at the portal example of the .NET ASP+ QuickStart 

Tuturial.

I was trying to do something like that. What i find very strange, is that 

for other server side controls like dropdown lists, buttons,... the post 

backs work. For the DataGrid EditColumn controls is doesn't work.

I just cant understand why.

Have you ever tryed it? Can it be a bug?



Thank you!



Telmo

>From: "Fredrik Normen" <fredrik.normen@e...>

>Reply-To: "ASP+" <aspx@p...>

>To: "ASP+" <aspx@p...>

>Subject: [aspx] Re: LoadControl problem

>Date: Wed, 01 Nov 2000 09:52:57 +0100

>

>Instead of using Page.LoadControl try to register it as an User control.

>

><%@ Register TagPrefix="My" TagName="MyControl" Src="mydatagrid.aspc" %>

>

>

>....

>

><My:MyControl RUNAT="Server"/>

>

>....

>

>/Fredrik Normen

>

>----- Original Message -----

>From: "Telmo Sa" <telmo_sa@h...>

>Date: Tuesday, October 31, 2000 2:41 pm

>Subject: [aspx] LoadControl problem

>

> > Hello all!

> > I have a little problem concerning loading a aspx page into

> > another one.

> > I have a ASP+ page that loads another as a control using the

> > Page.LoadControl directive.

> > The Control is a Page that has a DataGrid and its event handlers.

> > It loads the page ok.

> > In this DataGrid i have a EditColumn. When i click the Edit link

> > the event

> > handlers are not called. The postback happens but the

> > event handlers are not called.

> > Has anyone had this problem?

> > If i run the included page alone the datagrid events are caught!

> > Thank you!!

> >

> >    Telmo Sa

> >

>





Message #3 by "Fredrik Normen" <fredrik.normen@e...> on Thu, 02 Nov 2000 08:30:15 +0100
Have you add a FORM element with a runat attribute around the web 

control ?



I have a done a DataGrid with the ability to Edit columns, but have not 

put it into a User Control..



If you like you can send me your code and I will take a look at it.



/Fredrik Normen









----- Original Message -----

From: "telmo sa" <telmo_sa@h...>

Date: Wednesday, November 1, 2000 4:16 pm

Subject: [aspx] Re: LoadControl problem



> Hi!

> I have thought that, but for what i am trying to do, it wont work.

> I am trying to dinamicaly build a page that is composed of 

> diferent parts 

> depending on the user choice ( a set of tabs ).

> I saw a similar example at the portal example of the .NET ASP+ 

> QuickStart 

> Tuturial.

> I was trying to do something like that. What i find very strange, 

> is that 

> for other server side controls like dropdown lists, buttons,... 

> the post 

> backs work. For the DataGrid EditColumn controls is doesn't work.

> I just cant understand why.

> Have you ever tryed it? Can it be a bug?

> 

> Thank you!

> 

> Telmo

> >From: "Fredrik Normen" <fredrik.normen@e...>

> >Reply-To: "ASP+" <aspx@p...>

> >To: "ASP+" <aspx@p...>

> >Subject: [aspx] Re: LoadControl problem

> >Date: Wed, 01 Nov 2000 09:52:57 +0100

> >

> >Instead of using Page.LoadControl try to register it as an User 

> control.>

> ><%@ Register TagPrefix="My" TagName="MyControl" 

> Src="mydatagrid.aspc" %>

> >

> >

> >....

> >

> ><My:MyControl RUNAT="Server"/>

> >

> >....

> >

> >/Fredrik Normen

> >

> >----- Original Message -----

> >From: "Telmo Sa" <telmo_sa@h...>

> >Date: Tuesday, October 31, 2000 2:41 pm

> >Subject: [aspx] LoadControl problem

> >

> > > Hello all!

> > > I have a little problem concerning loading a aspx page into

> > > another one.

> > > I have a ASP+ page that loads another as a control using the

> > > Page.LoadControl directive.

> > > The Control is a Page that has a DataGrid and its event handlers.

> > > It loads the page ok.

> > > In this DataGrid i have a EditColumn. When i click the Edit link

> > > the event

> > > handlers are not called. The postback happens but the

> > > event handlers are not called.

> > > Has anyone had this problem?

> > > If i run the included page alone the datagrid events are caught!

> > > Thank you!!

> > >

> > >    Telmo Sa

> > >

> >

> 

> 

> 


  Return to Index