|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problems with Re-Usable ASP.NET User Control LibrariesHi all, I have built a library of ASCX UserControls (as described here
http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx ) but when I use it in a site I get these warnings for every control I import 'ASP.controls_documents_addupdated_ascx.Profile' hides inherited member 'AddUpdated.Profile'. Use the new keyword if hiding was intended. 'ASP.controls_documents_addupdated_ascx.ApplicationInstance' hides inherited member 'AddUpdated.ApplicationInstance'. Use the new keyword if hiding was intended. Does anyone know how to get rid of these problems? Thanks Stephen. The error tells you the answer :)
"Use the new keyword if hiding was intended" So change: class Foo { public ProfileCommon Profile; } to: class Foo { public new ProfileCommon Profile; } -Brock DevelopMentor http://staff.develop.com/ballen Show quoteHide quote > Hi all, I have built a library of ASCX UserControls (as described here > http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx ) but > when I use it in a site I get these warnings for every control I > import > > 'ASP.controls_documents_addupdated_ascx.Profile' hides inherited > member 'AddUpdated.Profile'. Use the new keyword if hiding was > intended. > > 'ASP.controls_documents_addupdated_ascx.ApplicationInstance' hides > inherited member 'AddUpdated.ApplicationInstance'. Use the new keyword > if hiding was intended. > > Does anyone know how to get rid of these problems? > > Thanks > > Stephen. > Err yes, but the code in question is being generated by the ASP.Net
compiler, I have no access to it! The error in full is (from a different project) Warning 1 'ASP.controls_test_mycontrol_ascx.Profile' hides inherited member 'MyControl.Profile'. Use the new keyword if hiding was intended. c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mainsite\76bd3d76\df82c897\App_Web_klnuovql.0.cs At no point have I declared a property called Profile! For example see this project http://www.perfectphase.com/store/hidding.zip Stephen. Show quoteHide quote "Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message news:b8743b1149cf88c7b600fac0b012@msnews.microsoft.com... > The error tells you the answer :) > > "Use the new keyword if hiding was intended" > > So change: > > class Foo > { > public ProfileCommon Profile; > } > > to: > > class Foo > { > public new ProfileCommon Profile; > } > > -Brock > DevelopMentor > http://staff.develop.com/ballen > >> Hi all, I have built a library of ASCX UserControls (as described here >> http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx ) but >> when I use it in a site I get these warnings for every control I >> import >> >> 'ASP.controls_documents_addupdated_ascx.Profile' hides inherited >> member 'AddUpdated.Profile'. Use the new keyword if hiding was >> intended. >> >> 'ASP.controls_documents_addupdated_ascx.ApplicationInstance' hides >> inherited member 'AddUpdated.ApplicationInstance'. Use the new keyword >> if hiding was intended. >> >> Does anyone know how to get rid of these problems? >> >> Thanks >> >> Stephen. >> > > Do you own the code for MyControl? If so, then what is the Profile property?
If you don't own the code for it, then I'd not worry too much about this unless the semantics of MyControl.Profile is different than that of the new ASP.NET Profile feature. -Brock DevelopMentor http://staff.develop.com/ballen Show quoteHide quote > Err yes, but the code in question is being generated by the ASP.Net > compiler, I have no access to it! The error in full is (from a > different project) > > Warning 1 'ASP.controls_test_mycontrol_ascx.Profile' hides inherited > member 'MyControl.Profile'. Use the new keyword if hiding was > intended. c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary > ASP.NET Files\mainsite\76bd3d76\df82c897\App_Web_klnuovql.0.cs > > At no point have I declared a property called Profile! > > For example see this project > http://www.perfectphase.com/store/hidding.zip > > Stephen. > > "Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message > news:b8743b1149cf88c7b600fac0b012@msnews.microsoft.com... > >> The error tells you the answer :) >> >> "Use the new keyword if hiding was intended" >> >> So change: >> >> class Foo >> { >> public ProfileCommon Profile; >> } >> to: >> >> class Foo >> { >> public new ProfileCommon Profile; >> } >> -Brock >> DevelopMentor >> http://staff.develop.com/ballen >>> Hi all, I have built a library of ASCX UserControls (as described >>> here http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx ) >>> but when I use it in a site I get these warnings for every control I >>> import >>> >>> 'ASP.controls_documents_addupdated_ascx.Profile' hides inherited >>> member 'AddUpdated.Profile'. Use the new keyword if hiding was >>> intended. >>> >>> 'ASP.controls_documents_addupdated_ascx.ApplicationInstance' hides >>> inherited member 'AddUpdated.ApplicationInstance'. Use the new >>> keyword if hiding was intended. >>> >>> Does anyone know how to get rid of these problems? >>> >>> Thanks >>> >>> Stephen. >>> Both the new and hidden definitions are created by the ascx compiler. I
could just ignore the warnings but even for the small project I'm working on I have over one hundred warnings already, just seems a bit of a mess for something that worked in 2003 with out issue. Stephen. Show quoteHide quote "Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message news:b8743b114a0988c7b642d4be61ec@msnews.microsoft.com... > Do you own the code for MyControl? If so, then what is the Profile > property? If you don't own the code for it, then I'd not worry too much > about this unless the semantics of MyControl.Profile is different than > that of the new ASP.NET Profile feature. > > -Brock > DevelopMentor > http://staff.develop.com/ballen > >> Err yes, but the code in question is being generated by the ASP.Net >> compiler, I have no access to it! The error in full is (from a >> different project) >> >> Warning 1 'ASP.controls_test_mycontrol_ascx.Profile' hides inherited >> member 'MyControl.Profile'. Use the new keyword if hiding was >> intended. c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary >> ASP.NET Files\mainsite\76bd3d76\df82c897\App_Web_klnuovql.0.cs >> >> At no point have I declared a property called Profile! >> >> For example see this project >> http://www.perfectphase.com/store/hidding.zip >> >> Stephen. >> >> "Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message >> news:b8743b1149cf88c7b600fac0b012@msnews.microsoft.com... >> >>> The error tells you the answer :) >>> >>> "Use the new keyword if hiding was intended" >>> >>> So change: >>> >>> class Foo >>> { >>> public ProfileCommon Profile; >>> } >>> to: >>> >>> class Foo >>> { >>> public new ProfileCommon Profile; >>> } >>> -Brock >>> DevelopMentor >>> http://staff.develop.com/ballen >>>> Hi all, I have built a library of ASCX UserControls (as described >>>> here http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx ) >>>> but when I use it in a site I get these warnings for every control I >>>> import >>>> >>>> 'ASP.controls_documents_addupdated_ascx.Profile' hides inherited >>>> member 'AddUpdated.Profile'. Use the new keyword if hiding was >>>> intended. >>>> >>>> 'ASP.controls_documents_addupdated_ascx.ApplicationInstance' hides >>>> inherited member 'AddUpdated.ApplicationInstance'. Use the new >>>> keyword if hiding was intended. >>>> >>>> Does anyone know how to get rid of these problems? >>>> >>>> Thanks >>>> >>>> Stephen. >>>> > > Hi Stephen,
I also think this is a control or project specific problem since based on my local test with reusing some precompiled user controls, there is no such warning in the new project. If possible, would you try building a simple project and test with some simplified usercontrols to reproduce this behavior? There must have some further classes or properties references in those usercontrols which cause this warning... Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | From: "Stephen Woolhead" <gtl@nospam.nospam> <b8743b114a0988c7b642d4be6***@msnews.microsoft.com>| References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries microsoft.public.dotnet.framework.aspnet.webcontrols:31121| Date: Sun, 13 Nov 2005 17:14:40 -0000 | Lines: 80 | X-Priority: 3 | X-MSMail-Priority: Normal | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 | X-RFC2646: Format=Flowed; Response | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 | Message-ID: <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | NNTP-Posting-Host: no-dns-yet.demon.co.uk 195.11.66.130 | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl | Xref: TK2MSFTNGXA02.phx.gbl Show quoteHide quote | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | | Both the new and hidden definitions are created by the ascx compiler. I | could just ignore the warnings but even for the small project I'm working on | I have over one hundred warnings already, just seems a bit of a mess for | something that worked in 2003 with out issue. | | Stephen. | | | "Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message | news:b8743b114a0988c7b642d4be61ec@msnews.microsoft.com... | > Do you own the code for MyControl? If so, then what is the Profile | > property? If you don't own the code for it, then I'd not worry too much | > about this unless the semantics of MyControl.Profile is different than | > that of the new ASP.NET Profile feature. | > | > -Brock | > DevelopMentor | > http://staff.develop.com/ballen | > | >> Err yes, but the code in question is being generated by the ASP.Net | >> compiler, I have no access to it! The error in full is (from a | >> different project) | >> | >> Warning 1 'ASP.controls_test_mycontrol_ascx.Profile' hides inherited | >> member 'MyControl.Profile'. Use the new keyword if hiding was | >> intended. c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary | >> ASP.NET Files\mainsite\76bd3d76\df82c897\App_Web_klnuovql.0.cs | >> | >> At no point have I declared a property called Profile! | >> | >> For example see this project | >> http://www.perfectphase.com/store/hidding.zip | >> | >> Stephen. | >> | >> "Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message | >> news:b8743b1149cf88c7b600fac0b012@msnews.microsoft.com... | >> | >>> The error tells you the answer :) | >>> | >>> "Use the new keyword if hiding was intended" | >>> | >>> So change: | >>> | >>> class Foo | >>> { | >>> public ProfileCommon Profile; | >>> } | >>> to: | >>> | >>> class Foo | >>> { | >>> public new ProfileCommon Profile; | >>> } | >>> -Brock | >>> DevelopMentor | >>> http://staff.develop.com/ballen | >>>> Hi all, I have built a library of ASCX UserControls (as described | >>>> here http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx ) | >>>> but when I use it in a site I get these warnings for every control I | >>>> import | >>>> | >>>> 'ASP.controls_documents_addupdated_ascx.Profile' hides inherited | >>>> member 'AddUpdated.Profile'. Use the new keyword if hiding was | >>>> intended. | >>>> | >>>> 'ASP.controls_documents_addupdated_ascx.ApplicationInstance' hides | >>>> inherited member 'AddUpdated.ApplicationInstance'. Use the new | >>>> keyword if hiding was intended. | >>>> | >>>> Does anyone know how to get rid of these problems? | >>>> | >>>> Thanks | >>>> | >>>> Stephen. | >>>> | > | > | | | This project shows the warnings.
The warnings are there, and I have now been told that the warnings where there (at least the ApplicationInstance anyway) in 2003, just that you never got to see the output of the compiler. Stephen. Show quoteHide quote "Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message news:gYWP27M6FHA.1240@TK2MSFTNGXA02.phx.gbl... > Hi Stephen, > > I also think this is a control or project specific problem since based on > my local test with reusing some precompiled user controls, there is no > such > warning in the new project. If possible, would you try building a simple > project and test with some simplified usercontrols to reproduce this > behavior? There must have some further classes or properties references in > those usercontrols which cause this warning... > > Thanks, > > Steven Cheng > Microsoft Online Support > > Get Secure! www.microsoft.com/security > (This posting is provided "AS IS", with no warranties, and confers no > rights.) > -------------------- > | From: "Stephen Woolhead" <gtl@nospam.nospam> > | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> > <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> > | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries > | Date: Sun, 13 Nov 2005 17:14:40 -0000 > | Lines: 80 > | X-Priority: 3 > | X-MSMail-Priority: Normal > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 > | X-RFC2646: Format=Flowed; Response > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 > | Message-ID: <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols > | NNTP-Posting-Host: no-dns-yet.demon.co.uk 195.11.66.130 > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl > | Xref: TK2MSFTNGXA02.phx.gbl > microsoft.public.dotnet.framework.aspnet.webcontrols:31121 > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols > | > | Both the new and hidden definitions are created by the ascx compiler. I > | could just ignore the warnings but even for the small project I'm > working > on > | I have over one hundred warnings already, just seems a bit of a mess for > | something that worked in 2003 with out issue. > | > | Stephen. > | > | > | "Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message > | news:b8743b114a0988c7b642d4be61ec@msnews.microsoft.com... > | > Do you own the code for MyControl? If so, then what is the Profile > | > property? If you don't own the code for it, then I'd not worry too > much > | > about this unless the semantics of MyControl.Profile is different than > | > that of the new ASP.NET Profile feature. > | > > | > -Brock > | > DevelopMentor > | > http://staff.develop.com/ballen > | > > | >> Err yes, but the code in question is being generated by the ASP.Net > | >> compiler, I have no access to it! The error in full is (from a > | >> different project) > | >> > | >> Warning 1 'ASP.controls_test_mycontrol_ascx.Profile' hides inherited > | >> member 'MyControl.Profile'. Use the new keyword if hiding was > | >> intended. c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary > | >> ASP.NET Files\mainsite\76bd3d76\df82c897\App_Web_klnuovql.0.cs > | >> > | >> At no point have I declared a property called Profile! > | >> > | >> For example see this project > | >> http://www.perfectphase.com/store/hidding.zip > | >> > | >> Stephen. > | >> > | >> "Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message > | >> news:b8743b1149cf88c7b600fac0b012@msnews.microsoft.com... > | >> > | >>> The error tells you the answer :) > | >>> > | >>> "Use the new keyword if hiding was intended" > | >>> > | >>> So change: > | >>> > | >>> class Foo > | >>> { > | >>> public ProfileCommon Profile; > | >>> } > | >>> to: > | >>> > | >>> class Foo > | >>> { > | >>> public new ProfileCommon Profile; > | >>> } > | >>> -Brock > | >>> DevelopMentor > | >>> http://staff.develop.com/ballen > | >>>> Hi all, I have built a library of ASCX UserControls (as described > | >>>> here > http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx ) > | >>>> but when I use it in a site I get these warnings for every control > I > | >>>> import > | >>>> > | >>>> 'ASP.controls_documents_addupdated_ascx.Profile' hides inherited > | >>>> member 'AddUpdated.Profile'. Use the new keyword if hiding was > | >>>> intended. > | >>>> > | >>>> 'ASP.controls_documents_addupdated_ascx.ApplicationInstance' hides > | >>>> inherited member 'AddUpdated.ApplicationInstance'. Use the new > | >>>> keyword if hiding was intended. > | >>>> > | >>>> Does anyone know how to get rid of these problems? > | >>>> > | >>>> Thanks > | >>>> > | >>>> Stephen. > | >>>> > | > > | > > | > | > | > "Stephen Woolhead" <gtl@nospam.nospam> wrote in message Opps, missed out the link...news:%23ZK%236aR6FHA.476@TK2MSFTNGP15.phx.gbl... > > This project shows the warnings. > http://www.perfectphase.com/store/hidding.zip Stephen. Hi Stephen,
After some further research, I've got the actual reason of the two properites "Profile" and "ApplicationInstance". They're two properties which related to ASP.NET web pages and usercontrol's compilation model. Since the PublishSite generated assemblies are the same as those generated by asp.net runtime (under temporarly folder...), those page and usercontrol's concrete classes will have some additional properties (which we doesn't define in our codebehind ...) . For example: the "Profile" Property is used to access the default Profile Provider for this application, and "ApplicationInstance" is used for accesssing the current Request's associated ApplicationInstance object... And as for the warning, it is because when the first time our reusable page or usercontrol is added into another website project, and when use "build" menu to build the website, VS.NET IDE will also try to generate another page class which inherit from that page/usercontrol's precompiled assembly (like App_Web_u02dnptq.dll), and since this class will also define a "Profile or ApplicationInstance" property, we'll get that warning.....(some what like a duplicated derived class...) In addition, I think we can just ignore this warning, because when we publish our MainSite (which reuse those pages or controls), the precompiled assemblies won't really generate a duplicated derived class, still reference the orginally generated precompiled assembly. I've performed some tests on myside to verify this. Hope helps. Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | From: "Stephen Woolhead" <gtl@nospam.nospam> <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries microsoft.public.dotnet.framework.aspnet.webcontrols:31136| Date: Mon, 14 Nov 2005 16:31:25 -0000 | Lines: 14 | X-Priority: 3 | X-MSMail-Priority: Normal | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 | X-RFC2646: Format=Flowed; Response | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 | Message-ID: <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | NNTP-Posting-Host: no-dns-yet.demon.co.uk 195.11.66.130 | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl | Xref: TK2MSFTNGXA02.phx.gbl Show quoteHide quote | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | | | "Stephen Woolhead" <gtl@nospam.nospam> wrote in message | news:%23ZK%236aR6FHA.476@TK2MSFTNGP15.phx.gbl... | > | > This project shows the warnings. | > | | Opps, missed out the link... | | http://www.perfectphase.com/store/hidding.zip | | Stephen. | | | Hi Stephen,
How are you doing on this issue, does my last reply helps you understand this a little further? If there're anything else we can help, please feel free to post here. Thanks, Regards, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | X-Tomcat-ID: 324474533 <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> | MIME-Version: 1.0 microsoft.public.dotnet.framework.aspnet.webcontrols:31147| Content-Type: text/plain | Content-Transfer-Encoding: 7bit | From: stch***@online.microsoft.com (Steven Cheng[MSFT]) | Organization: Microsoft | Date: Tue, 15 Nov 2005 15:14:39 GMT | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | Message-ID: <lOKwQdf6FHA.4***@TK2MSFTNGXA02.phx.gbl> | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | Lines: 78 | Path: TK2MSFTNGXA02.phx.gbl | Xref: TK2MSFTNGXA02.phx.gbl Show quoteHide quote | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182 | | Hi Stephen, | | After some further research, I've got the actual reason of the two | properites "Profile" and "ApplicationInstance". They're two properties | which related to ASP.NET web pages and usercontrol's compilation model. | Since the PublishSite generated assemblies are the same as those generated | by asp.net runtime (under temporarly folder...), those page and | usercontrol's concrete classes will have some additional properties (which | we doesn't define in our codebehind ...) . For example: | | the "Profile" Property is used to access the default Profile Provider for | this application, and "ApplicationInstance" is used for accesssing the | current Request's associated ApplicationInstance object... | | And as for the warning, it is because when the first time our reusable page | or usercontrol is added into another website project, and when use "build" | menu to build the website, VS.NET IDE will also try to generate another | page class which inherit from that page/usercontrol's precompiled assembly | (like App_Web_u02dnptq.dll), and since this class will also define a | "Profile or ApplicationInstance" property, we'll get that warning.....(some | what like a duplicated derived class...) | | In addition, I think we can just ignore this warning, because when we | publish our MainSite (which reuse those pages or controls), the precompiled | assemblies won't really generate a duplicated derived class, still | reference the orginally generated precompiled assembly. I've performed some | tests on myside to verify this. | | Hope helps. Thanks, | | Steven Cheng | Microsoft Online Support | | Get Secure! www.microsoft.com/security | (This posting is provided "AS IS", with no warranties, and confers no | rights.) | | | | -------------------- | | From: "Stephen Woolhead" <gtl@nospam.nospam> | | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> | <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> | <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> | <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> | <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> | | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries | | Date: Mon, 14 Nov 2005 16:31:25 -0000 | | Lines: 14 | | X-Priority: 3 | | X-MSMail-Priority: Normal | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 | | X-RFC2646: Format=Flowed; Response | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 | | Message-ID: <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> | | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | | NNTP-Posting-Host: no-dns-yet.demon.co.uk 195.11.66.130 | | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl | | Xref: TK2MSFTNGXA02.phx.gbl | microsoft.public.dotnet.framework.aspnet.webcontrols:31136 | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | | | | | | "Stephen Woolhead" <gtl@nospam.nospam> wrote in message | | news:%23ZK%236aR6FHA.476@TK2MSFTNGP15.phx.gbl... | | > | | > This project shows the warnings. | | > | | | | Opps, missed out the link... | | | | http://www.perfectphase.com/store/hidding.zip | | | | Stephen. | | | | | | | | I understand what's happing and why. It isn't causing me a problem, my
project seems to be working. My problem with this is that it is a messy solution, now that I have converted all my control libraries I have hundreds of warnings that I'll never be able to get rid off that are obscuring other warnings that may be of use to me. Stephen Show quoteHide quote "Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message news:UYHmdj46FHA.3484@TK2MSFTNGXA02.phx.gbl... > Hi Stephen, > > How are you doing on this issue, does my last reply helps you understand > this a little further? If there're anything else we can help, please feel > free to post here. Thanks, > > Regards, > > Steven Cheng > Microsoft Online Support > > Get Secure! www.microsoft.com/security > (This posting is provided "AS IS", with no warranties, and confers no > rights.) > > -------------------- > | X-Tomcat-ID: 324474533 > | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> > <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> > <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> > <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> > <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> > <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> > | MIME-Version: 1.0 > | Content-Type: text/plain > | Content-Transfer-Encoding: 7bit > | From: stch***@online.microsoft.com (Steven Cheng[MSFT]) > | Organization: Microsoft > | Date: Tue, 15 Nov 2005 15:14:39 GMT > | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols > | Message-ID: <lOKwQdf6FHA.4***@TK2MSFTNGXA02.phx.gbl> > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols > | Lines: 78 > | Path: TK2MSFTNGXA02.phx.gbl > | Xref: TK2MSFTNGXA02.phx.gbl > microsoft.public.dotnet.framework.aspnet.webcontrols:31147 > | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182 > | > | Hi Stephen, > | > | After some further research, I've got the actual reason of the two > | properites "Profile" and "ApplicationInstance". They're two properties > | which related to ASP.NET web pages and usercontrol's compilation model. > | Since the PublishSite generated assemblies are the same as those > generated > | by asp.net runtime (under temporarly folder...), those page and > | usercontrol's concrete classes will have some additional properties > (which > | we doesn't define in our codebehind ...) . For example: > | > | the "Profile" Property is used to access the default Profile Provider > for > | this application, and "ApplicationInstance" is used for accesssing the > | current Request's associated ApplicationInstance object... > | > | And as for the warning, it is because when the first time our reusable > page > | or usercontrol is added into another website project, and when use > "build" > | menu to build the website, VS.NET IDE will also try to generate another > | page class which inherit from that page/usercontrol's precompiled > assembly > | (like App_Web_u02dnptq.dll), and since this class will also define a > | "Profile or ApplicationInstance" property, we'll get that > warning.....(some > | what like a duplicated derived class...) > | > | In addition, I think we can just ignore this warning, because when we > | publish our MainSite (which reuse those pages or controls), the > precompiled > | assemblies won't really generate a duplicated derived class, still > | reference the orginally generated precompiled assembly. I've performed > some > | tests on myside to verify this. > | > | Hope helps. Thanks, > | > | Steven Cheng > | Microsoft Online Support > | > | Get Secure! www.microsoft.com/security > | (This posting is provided "AS IS", with no warranties, and confers no > | rights.) > | > | > | > | -------------------- > | | From: "Stephen Woolhead" <gtl@nospam.nospam> > | | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> > | <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> > | <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> > | <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> > | <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> > | | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries > | | Date: Mon, 14 Nov 2005 16:31:25 -0000 > | | Lines: 14 > | | X-Priority: 3 > | | X-MSMail-Priority: Normal > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 > | | X-RFC2646: Format=Flowed; Response > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 > | | Message-ID: <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> > | | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols > | | NNTP-Posting-Host: no-dns-yet.demon.co.uk 195.11.66.130 > | | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl > | | Xref: TK2MSFTNGXA02.phx.gbl > | microsoft.public.dotnet.framework.aspnet.webcontrols:31136 > | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols > | | > | | > | | "Stephen Woolhead" <gtl@nospam.nospam> wrote in message > | | news:%23ZK%236aR6FHA.476@TK2MSFTNGP15.phx.gbl... > | | > > | | > This project shows the warnings. > | | > > | | > | | Opps, missed out the link... > | | > | | http://www.perfectphase.com/store/hidding.zip > | | > | | Stephen. > | | > | | > | | > | > | > Thanks for your further followup.
Yes, I can see that when the imported precompiled controls' count increase, the warnings will become a pain. However, this is somewhat the limitation of such programming model. Since the new ASP.NET 2.0's precompiled model provide the functionality to let dynamic page class precompiled, and let us reuse existing compiled pages and usercontrols conveniently, but it'll also cause some negative behaviors. Sometimes it's hard to make it complete perfect. Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | From: "Stephen Woolhead" <gtl@nospam.nospam> <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> <lOKwQdf6FHA.4***@TK2MSFTNGXA02.phx.gbl> <UYHmdj46FHA.3***@TK2MSFTNGXA02.phx.gbl> | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries microsoft.public.dotnet.framework.aspnet.webcontrols:31197| Date: Fri, 18 Nov 2005 09:39:33 -0000 | Lines: 142 | X-Priority: 3 | X-MSMail-Priority: Normal | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 | X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 | X-RFC2646: Format=Flowed; Original | Message-ID: <ucX$8PC7FHA.***@TK2MSFTNGP09.phx.gbl> | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | NNTP-Posting-Host: no-dns-yet.demon.co.uk 195.11.66.130 | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl | Xref: TK2MSFTNGXA02.phx.gbl Show quoteHide quote | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl| | I understand what's happing and why. It isn't causing me a problem, my | project seems to be working. | | My problem with this is that it is a messy solution, now that I have | converted all my control libraries I have hundreds of warnings that I'll | never be able to get rid off that are obscuring other warnings that may be | of use to me. | | Stephen | | "Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message | news:UYHmdj46FHA.3484@TK2MSFTNGXA02.phx.gbl... | > Hi Stephen, | > | > How are you doing on this issue, does my last reply helps you understand | > this a little further? If there're anything else we can help, please feel | > free to post here. Thanks, | > | > Regards, | > | > Steven Cheng | > Microsoft Online Support | > | > Get Secure! www.microsoft.com/security | > (This posting is provided "AS IS", with no warranties, and confers no | > rights.) | > | > -------------------- | > | X-Tomcat-ID: 324474533 | > | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> | > <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> | > <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> | > <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> | > <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> | > <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> | > | MIME-Version: 1.0 | > | Content-Type: text/plain | > | Content-Transfer-Encoding: 7bit | > | From: stch***@online.microsoft.com (Steven Cheng[MSFT]) | > | Organization: Microsoft | > | Date: Tue, 15 Nov 2005 15:14:39 GMT | > | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | > | Message-ID: <lOKwQdf6FHA.4***@TK2MSFTNGXA02.phx.gbl> | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | > | Lines: 78 | > | Path: TK2MSFTNGXA02.phx.gbl | > | Xref: TK2MSFTNGXA02.phx.gbl | > microsoft.public.dotnet.framework.aspnet.webcontrols:31147 | > | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182 | > | | > | Hi Stephen, | > | | > | After some further research, I've got the actual reason of the two | > | properites "Profile" and "ApplicationInstance". They're two properties | > | which related to ASP.NET web pages and usercontrol's compilation model. | > | Since the PublishSite generated assemblies are the same as those | > generated | > | by asp.net runtime (under temporarly folder...), those page and | > | usercontrol's concrete classes will have some additional properties | > (which | > | we doesn't define in our codebehind ...) . For example: | > | | > | the "Profile" Property is used to access the default Profile Provider | > for | > | this application, and "ApplicationInstance" is used for accesssing the | > | current Request's associated ApplicationInstance object... | > | | > | And as for the warning, it is because when the first time our reusable | > page | > | or usercontrol is added into another website project, and when use | > "build" | > | menu to build the website, VS.NET IDE will also try to generate another | > | page class which inherit from that page/usercontrol's precompiled | > assembly | > | (like App_Web_u02dnptq.dll), and since this class will also define a | > | "Profile or ApplicationInstance" property, we'll get that | > warning.....(some | > | what like a duplicated derived class...) | > | | > | In addition, I think we can just ignore this warning, because when we | > | publish our MainSite (which reuse those pages or controls), the | > precompiled | > | assemblies won't really generate a duplicated derived class, still | > | reference the orginally generated precompiled assembly. I've performed | > some | > | tests on myside to verify this. | > | | > | Hope helps. Thanks, | > | | > | Steven Cheng | > | Microsoft Online Support | > | | > | Get Secure! www.microsoft.com/security | > | (This posting is provided "AS IS", with no warranties, and confers no | > | rights.) | > | | > | | > | | > | -------------------- | > | | From: "Stephen Woolhead" <gtl@nospam.nospam> | > | | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> | > | <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> | > | <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> | > | <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> | > | <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> | > | | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries | > | | Date: Mon, 14 Nov 2005 16:31:25 -0000 | > | | Lines: 14 | > | | X-Priority: 3 | > | | X-MSMail-Priority: Normal | > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 | > | | X-RFC2646: Format=Flowed; Response | > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 | > | | Message-ID: <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> | > | | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | > | | NNTP-Posting-Host: no-dns-yet.demon.co.uk 195.11.66.130 | > | | Path: Show quoteHide quote | > | | Xref: TK2MSFTNGXA02.phx.gbl | > | microsoft.public.dotnet.framework.aspnet.webcontrols:31136 | > | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | > | | | > | | | > | | "Stephen Woolhead" <gtl@nospam.nospam> wrote in message | > | | news:%23ZK%236aR6FHA.476@TK2MSFTNGP15.phx.gbl... | > | | > | > | | > This project shows the warnings. | > | | > | > | | | > | | Opps, missed out the link... | > | | | > | | http://www.perfectphase.com/store/hidding.zip | > | | | > | | Stephen. | > | | | > | | | > | | | > | | > | | > | | | I have been wondering if there is a reason these two methods are implimented
on the dynamic page class instead of in the base UserControl class? Stephen. Show quoteHide quote "Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message news:dFg%23HFE7FHA.1240@TK2MSFTNGXA02.phx.gbl... > Thanks for your further followup. > > Yes, I can see that when the imported precompiled controls' count > increase, > the warnings will become a pain. However, this is somewhat the limitation > of such programming model. Since the new ASP.NET 2.0's precompiled model > provide the functionality to let dynamic page class precompiled, and let > us > reuse existing compiled pages and usercontrols conveniently, but it'll > also > cause some negative behaviors. Sometimes it's hard to make it complete > perfect. > > Thanks, > > Steven Cheng > Microsoft Online Support > > Get Secure! www.microsoft.com/security > (This posting is provided "AS IS", with no warranties, and confers no > rights.) > -------------------- > | From: "Stephen Woolhead" <gtl@nospam.nospam> > | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> > <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> > <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> > <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> > <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> > <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> > <lOKwQdf6FHA.4***@TK2MSFTNGXA02.phx.gbl> > <UYHmdj46FHA.3***@TK2MSFTNGXA02.phx.gbl> > | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries > | Date: Fri, 18 Nov 2005 09:39:33 -0000 > | Lines: 142 > | X-Priority: 3 > | X-MSMail-Priority: Normal > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 > | X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 > | X-RFC2646: Format=Flowed; Original > | Message-ID: <ucX$8PC7FHA.***@TK2MSFTNGP09.phx.gbl> > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols > | NNTP-Posting-Host: no-dns-yet.demon.co.uk 195.11.66.130 > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl > | Xref: TK2MSFTNGXA02.phx.gbl > microsoft.public.dotnet.framework.aspnet.webcontrols:31197 > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols > | > | I understand what's happing and why. It isn't causing me a problem, my > | project seems to be working. > | > | My problem with this is that it is a messy solution, now that I have > | converted all my control libraries I have hundreds of warnings that I'll > | never be able to get rid off that are obscuring other warnings that may > be > | of use to me. > | > | Stephen > | > | "Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message > | news:UYHmdj46FHA.3484@TK2MSFTNGXA02.phx.gbl... > | > Hi Stephen, > | > > | > How are you doing on this issue, does my last reply helps you > understand > | > this a little further? If there're anything else we can help, please > feel > | > free to post here. Thanks, > | > > | > Regards, > | > > | > Steven Cheng > | > Microsoft Online Support > | > > | > Get Secure! www.microsoft.com/security > | > (This posting is provided "AS IS", with no warranties, and confers no > | > rights.) > | > > | > -------------------- > | > | X-Tomcat-ID: 324474533 > | > | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> > | > <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> > | > <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> > | > <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> > | > <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> > | > <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> > | > | MIME-Version: 1.0 > | > | Content-Type: text/plain > | > | Content-Transfer-Encoding: 7bit > | > | From: stch***@online.microsoft.com (Steven Cheng[MSFT]) > | > | Organization: Microsoft > | > | Date: Tue, 15 Nov 2005 15:14:39 GMT > | > | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols > | > | Message-ID: <lOKwQdf6FHA.4***@TK2MSFTNGXA02.phx.gbl> > | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols > | > | Lines: 78 > | > | Path: TK2MSFTNGXA02.phx.gbl > | > | Xref: TK2MSFTNGXA02.phx.gbl > | > microsoft.public.dotnet.framework.aspnet.webcontrols:31147 > | > | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182 > | > | > | > | Hi Stephen, > | > | > | > | After some further research, I've got the actual reason of the two > | > | properites "Profile" and "ApplicationInstance". They're two > properties > | > | which related to ASP.NET web pages and usercontrol's compilation > model. > | > | Since the PublishSite generated assemblies are the same as those > | > generated > | > | by asp.net runtime (under temporarly folder...), those page and > | > | usercontrol's concrete classes will have some additional properties > | > (which > | > | we doesn't define in our codebehind ...) . For example: > | > | > | > | the "Profile" Property is used to access the default Profile > Provider > | > for > | > | this application, and "ApplicationInstance" is used for accesssing > the > | > | current Request's associated ApplicationInstance object... > | > | > | > | And as for the warning, it is because when the first time our > reusable > | > page > | > | or usercontrol is added into another website project, and when use > | > "build" > | > | menu to build the website, VS.NET IDE will also try to generate > another > | > | page class which inherit from that page/usercontrol's precompiled > | > assembly > | > | (like App_Web_u02dnptq.dll), and since this class will also define > a > | > | "Profile or ApplicationInstance" property, we'll get that > | > warning.....(some > | > | what like a duplicated derived class...) > | > | > | > | In addition, I think we can just ignore this warning, because when > we > | > | publish our MainSite (which reuse those pages or controls), the > | > precompiled > | > | assemblies won't really generate a duplicated derived class, still > | > | reference the orginally generated precompiled assembly. I've > performed > | > some > | > | tests on myside to verify this. > | > | > | > | Hope helps. Thanks, > | > | > | > | Steven Cheng > | > | Microsoft Online Support > | > | > | > | Get Secure! www.microsoft.com/security > | > | (This posting is provided "AS IS", with no warranties, and confers > no > | > | rights.) > | > | > | > | > | > | > | > | -------------------- > | > | | From: "Stephen Woolhead" <gtl@nospam.nospam> > | > | | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> > | > | <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> > | > | <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> > | > | <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> > | > | <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> > | > | | Subject: Re: Problems with Re-Usable ASP.NET User Control > Libraries > | > | | Date: Mon, 14 Nov 2005 16:31:25 -0000 > | > | | Lines: 14 > | > | | X-Priority: 3 > | > | | X-MSMail-Priority: Normal > | > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 > | > | | X-RFC2646: Format=Flowed; Response > | > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 > | > | | Message-ID: <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> > | > | | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols > | > | | NNTP-Posting-Host: no-dns-yet.demon.co.uk 195.11.66.130 > | > | | Path: > TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl > | > | | Xref: TK2MSFTNGXA02.phx.gbl > | > | microsoft.public.dotnet.framework.aspnet.webcontrols:31136 > | > | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols > | > | | > | > | | > | > | | "Stephen Woolhead" <gtl@nospam.nospam> wrote in message > | > | | news:%23ZK%236aR6FHA.476@TK2MSFTNGP15.phx.gbl... > | > | | > > | > | | > This project shows the warnings. > | > | | > > | > | | > | > | | Opps, missed out the link... > | > | | > | > | | http://www.perfectphase.com/store/hidding.zip > | > | | > | > | | Stephen. > | > | | > | > | | > | > | | > | > | > | > | > | > > | > | > | > Thanks for your reply Stephen,
As for why the ASP.NET will choose to make the Profile and ApplicationInstance interface dynamically compiled into the page or usercontrol classes, it is somewhat from performance consideration. And we could also call this a Lazy-Involve design. As for Profile service, not all the ASP.NET web application will use it, as we can see that Profile servcie can be disable in the web.config and in such scenario , the ASP.NET runtime won't adding profiles service interfaces into Page or usercontrol classes which can reduce some overhead... And for ApplicaitonInstance, that'll be more complex than Profile service, it is not determined by some configuration setting but by analyzing our page or control's code to see whether ApplicaitonInstance is necessary. So I think this is also one of the benefit provided by dynanmic compilation... Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | From: "Stephen Woolhead" <gtl@nospam.nospam> <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> <lOKwQdf6FHA.4***@TK2MSFTNGXA02.phx.gbl> <UYHmdj46FHA.3***@TK2MSFTNGXA02.phx.gbl> <ucX$8PC7FHA.***@TK2MSFTNGP09.phx.gbl> <dFg#HFE7FHA.1***@TK2MSFTNGXA02.phx.gbl> | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries microsoft.public.dotnet.framework.aspnet.webcontrols:31205| Date: Fri, 18 Nov 2005 16:00:24 -0000 | Lines: 216 | X-Priority: 3 | X-MSMail-Priority: Normal | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 | X-RFC2646: Format=Flowed; Original | Message-ID: <#BrMxkF7FHA.1***@TK2MSFTNGP12.phx.gbl> | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | NNTP-Posting-Host: no-dns-yet.demon.co.uk 195.11.66.130 | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl | Xref: TK2MSFTNGXA02.phx.gbl Show quoteHide quote | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols microsoft.public.dotnet.framework.aspnet.webcontrols| | | I have been wondering if there is a reason these two methods are implimented | on the dynamic page class instead of in the base UserControl class? | | Stephen. | | "Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message | news:dFg%23HFE7FHA.1240@TK2MSFTNGXA02.phx.gbl... | > Thanks for your further followup. | > | > Yes, I can see that when the imported precompiled controls' count | > increase, | > the warnings will become a pain. However, this is somewhat the limitation | > of such programming model. Since the new ASP.NET 2.0's precompiled model | > provide the functionality to let dynamic page class precompiled, and let | > us | > reuse existing compiled pages and usercontrols conveniently, but it'll | > also | > cause some negative behaviors. Sometimes it's hard to make it complete | > perfect. | > | > Thanks, | > | > Steven Cheng | > Microsoft Online Support | > | > Get Secure! www.microsoft.com/security | > (This posting is provided "AS IS", with no warranties, and confers no | > rights.) | > -------------------- | > | From: "Stephen Woolhead" <gtl@nospam.nospam> | > | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> | > <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> | > <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> | > <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> | > <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> | > <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> | > <lOKwQdf6FHA.4***@TK2MSFTNGXA02.phx.gbl> | > <UYHmdj46FHA.3***@TK2MSFTNGXA02.phx.gbl> | > | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries | > | Date: Fri, 18 Nov 2005 09:39:33 -0000 | > | Lines: 142 | > | X-Priority: 3 | > | X-MSMail-Priority: Normal | > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 | > | X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 | > | X-RFC2646: Format=Flowed; Original | > | Message-ID: <ucX$8PC7FHA.***@TK2MSFTNGP09.phx.gbl> | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | > | NNTP-Posting-Host: no-dns-yet.demon.co.uk 195.11.66.130 | > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl | > | Xref: TK2MSFTNGXA02.phx.gbl | > microsoft.public.dotnet.framework.aspnet.webcontrols:31197 | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | > | | > | I understand what's happing and why. It isn't causing me a problem, my | > | project seems to be working. | > | | > | My problem with this is that it is a messy solution, now that I have | > | converted all my control libraries I have hundreds of warnings that I'll | > | never be able to get rid off that are obscuring other warnings that may | > be | > | of use to me. | > | | > | Stephen | > | | > | "Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message | > | news:UYHmdj46FHA.3484@TK2MSFTNGXA02.phx.gbl... | > | > Hi Stephen, | > | > | > | > How are you doing on this issue, does my last reply helps you | > understand | > | > this a little further? If there're anything else we can help, please | > feel | > | > free to post here. Thanks, | > | > | > | > Regards, | > | > | > | > Steven Cheng | > | > Microsoft Online Support | > | > | > | > Get Secure! www.microsoft.com/security | > | > (This posting is provided "AS IS", with no warranties, and confers no | > | > rights.) | > | > | > | > -------------------- | > | > | X-Tomcat-ID: 324474533 | > | > | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> | > | > <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> | > | > <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> | > | > <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> | > | > <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> | > | > <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> | > | > | MIME-Version: 1.0 | > | > | Content-Type: text/plain | > | > | Content-Transfer-Encoding: 7bit | > | > | From: stch***@online.microsoft.com (Steven Cheng[MSFT]) | > | > | Organization: Microsoft | > | > | Date: Tue, 15 Nov 2005 15:14:39 GMT | > | > | Subject: Re: Problems with Re-Usable ASP.NET User Control Libraries | > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | > | > | Message-ID: <lOKwQdf6FHA.4***@TK2MSFTNGXA02.phx.gbl> | > | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | > | > | Lines: 78 | > | > | Path: TK2MSFTNGXA02.phx.gbl | > | > | Xref: TK2MSFTNGXA02.phx.gbl | > | > microsoft.public.dotnet.framework.aspnet.webcontrols:31147 | > | > | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182 | > | > | | > | > | Hi Stephen, | > | > | | > | > | After some further research, I've got the actual reason of the two | > | > | properites "Profile" and "ApplicationInstance". They're two | > properties | > | > | which related to ASP.NET web pages and usercontrol's compilation | > model. | > | > | Since the PublishSite generated assemblies are the same as those | > | > generated | > | > | by asp.net runtime (under temporarly folder...), those page and | > | > | usercontrol's concrete classes will have some additional properties | > | > (which | > | > | we doesn't define in our codebehind ...) . For example: | > | > | | > | > | the "Profile" Property is used to access the default Profile | > Provider | > | > for | > | > | this application, and "ApplicationInstance" is used for accesssing | > the | > | > | current Request's associated ApplicationInstance object... | > | > | | > | > | And as for the warning, it is because when the first time our | > reusable | > | > page | > | > | or usercontrol is added into another website project, and when use | > | > "build" | > | > | menu to build the website, VS.NET IDE will also try to generate | > another | > | > | page class which inherit from that page/usercontrol's precompiled | > | > assembly | > | > | (like App_Web_u02dnptq.dll), and since this class will also define | > a | > | > | "Profile or ApplicationInstance" property, we'll get that | > | > warning.....(some | > | > | what like a duplicated derived class...) | > | > | | > | > | In addition, I think we can just ignore this warning, because when | > we | > | > | publish our MainSite (which reuse those pages or controls), the | > | > precompiled | > | > | assemblies won't really generate a duplicated derived class, still | > | > | reference the orginally generated precompiled assembly. I've | > performed | > | > some | > | > | tests on myside to verify this. | > | > | | > | > | Hope helps. Thanks, | > | > | | > | > | Steven Cheng | > | > | Microsoft Online Support | > | > | | > | > | Get Secure! www.microsoft.com/security | > | > | (This posting is provided "AS IS", with no warranties, and confers | > no | > | > | rights.) | > | > | | > | > | | > | > | | > | > | -------------------- | > | > | | From: "Stephen Woolhead" <gtl@nospam.nospam> | > | > | | References: <##1dyKF6FHA.***@TK2MSFTNGP10.phx.gbl> | > | > | <b8743b114a0988c7b642d4be6***@msnews.microsoft.com> | > | > | <OT$78WH6FHA.1***@TK2MSFTNGP09.phx.gbl> | > | > | <gYWP27M6FHA.1***@TK2MSFTNGXA02.phx.gbl> | > | > | <#ZK#6aR6FHA.***@TK2MSFTNGP15.phx.gbl> | > | > | | Subject: Re: Problems with Re-Usable ASP.NET User Control | > Libraries | > | > | | Date: Mon, 14 Nov 2005 16:31:25 -0000 | > | > | | Lines: 14 | > | > | | X-Priority: 3 | > | > | | X-MSMail-Priority: Normal | > | > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 | > | > | | X-RFC2646: Format=Flowed; Response | > | > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 | > | > | | Message-ID: <#bkicjT6FHA.***@TK2MSFTNGP10.phx.gbl> | > | > | | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | > | > | | NNTP-Posting-Host: no-dns-yet.demon.co.uk 195.11.66.130 | > | > | | Path: | > TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl | > | > | | Xref: TK2MSFTNGXA02.phx.gbl | > | > | microsoft.public.dotnet.framework.aspnet.webcontrols:31136 | > | > | | X-Tomcat-NG: Show quoteHide quote | > | > | | | > | > | | | > | > | | "Stephen Woolhead" <gtl@nospam.nospam> wrote in message | > | > | | news:%23ZK%236aR6FHA.476@TK2MSFTNGP15.phx.gbl... | > | > | | > | > | > | | > This project shows the warnings. | > | > | | > | > | > | | | > | > | | Opps, missed out the link... | > | > | | | > | > | | http://www.perfectphase.com/store/hidding.zip | > | > | | | > | > | | Stephen. | > | > | | | > | > | | | > | > | | | > | > | | > | > | | > | > | > | | > | | > | | > | | |
WebCLient
Web Server Control and property tree in design time like Font has. Retrieve Datagrid Element Index by Name Retrieve GridView column header text on sort how to override DropDownList.SelectedValue property DropDownList Box cannot access container data in templated control Webcontrol custom designer LoadControl and Multiple IDs in UserControls Error Newbie Listbox |
|||||||||||||||||||||||