Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > RE: Custom ContentPlaceHolder

Reply
Thread Tools

RE: Custom ContentPlaceHolder

 
 
Allen Chen [MSFT]
Guest
Posts: n/a
 
      06-22-2009

Hi Gerry,

>I looked throught the associated control/designer/builder classes in
>relector but didn't see anything that looked like the culprit.
>One thing I couldn't find was the MasterPageWebFormDesigner which

according
>the MasterPage metadata in vs is supposed to be in
>Microsoft.VisualStudio.Web.dll.
>Either this class does not exist in this dll or reflector doesn't see it

for
>some reason.


This exception is exactly thrown by MasterPageWebFormDesigner. So I think
it's by design and we cannot do anything to eliminate it. You can submit a
feedback on the connect site to inform our develop team. Our dedicated
engineers will evaluate your feedback and decide whether to improve it in
the future.

https://connect.microsoft.com/Visual...backForm.aspx?
FeedbackFormConfigurationID=3471&FeedbackType=2

If you want to look into details, please use reflector to view the code in
Microsoft.VisualStudio.Web.dll. You can download the assembly from:

http://cid-2fa13ebc6cc8e80f.skydrive.../Microsoft.Vis
ualStudio.Web.dll


Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
http://www.velocityreviews.com/forums/(E-Mail Removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



 
Reply With Quote
 
 
 
 
fruitbatinshades
Guest
Posts: n/a
 
      06-23-2009

Has any progress been made on this issue? I am having the same problem and
wondered if it has been addressed or if someone has found a workaround?

"Allen Chen [MSFT]" wrote:

> Hi Gerry,
>
> >I looked throught the associated control/designer/builder classes in
> >relector but didn't see anything that looked like the culprit.
> >One thing I couldn't find was the MasterPageWebFormDesigner which

> according
> >the MasterPage metadata in vs is supposed to be in
> >Microsoft.VisualStudio.Web.dll.
> >Either this class does not exist in this dll or reflector doesn't see it

> for
> >some reason.

>
> This exception is exactly thrown by MasterPageWebFormDesigner. So I think
> it's by design and we cannot do anything to eliminate it. You can submit a
> feedback on the connect site to inform our develop team. Our dedicated
> engineers will evaluate your feedback and decide whether to improve it in
> the future.
>
> https://connect.microsoft.com/Visual...backForm.aspx?
> FeedbackFormConfigurationID=3471&FeedbackType=2
>
> If you want to look into details, please use reflector to view the code in
> Microsoft.VisualStudio.Web.dll. You can download the assembly from:
>
> http://cid-2fa13ebc6cc8e80f.skydrive.../Microsoft.Vis
> ualStudio.Web.dll
>
>
> Regards,
> Allen Chen
> Microsoft Online Support
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> (E-Mail Removed).
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/en-us/subs...#notifications.
>
> Note: MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 2 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions. Issues of this
> nature are best handled working with a dedicated Microsoft Support Engineer
> by contacting Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
>

 
Reply With Quote
 
 
 
 
Allen Chen [MSFT]
Guest
Posts: n/a
 
      06-24-2009

Hi,

I believe there's no way to workaround this issue. It's a pure designer
issue that is caused by MasterPageWebFormDesigner. You can submit your
feedback in the connect site:

https://connect.microsoft.com/Visual...backForm.aspx?
FeedbackFormConfigurationID=3471&FeedbackType=2

Our product team engineers will evaluate your feedback to see if we can
improve this in the future edition of Visual Studio.

Regards,
Allen Chen
Microsoft Online Support

 
Reply With Quote
 
gerry
Guest
Posts: n/a
 
      06-24-2009

Sounds like we are SOL on this one due to some 'by design' bug in the
designer.
My guess is that the master page designer was created by an entry level
summer intern who never saw any reason for anyone to ever derive a custom
placeholder and accordingly they made sure that you couldn't.



"fruitbatinshades" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> Has any progress been made on this issue? I am having the same problem and
> wondered if it has been addressed or if someone has found a workaround?
>
> "Allen Chen [MSFT]" wrote:
>
>> Hi Gerry,
>>
>> >I looked throught the associated control/designer/builder classes in
>> >relector but didn't see anything that looked like the culprit.
>> >One thing I couldn't find was the MasterPageWebFormDesigner which

>> according
>> >the MasterPage metadata in vs is supposed to be in
>> >Microsoft.VisualStudio.Web.dll.
>> >Either this class does not exist in this dll or reflector doesn't see it

>> for
>> >some reason.

>>
>> This exception is exactly thrown by MasterPageWebFormDesigner. So I think
>> it's by design and we cannot do anything to eliminate it. You can submit
>> a
>> feedback on the connect site to inform our develop team. Our dedicated
>> engineers will evaluate your feedback and decide whether to improve it in
>> the future.
>>
>> https://connect.microsoft.com/Visual...backForm.aspx?
>> FeedbackFormConfigurationID=3471&FeedbackType=2
>>
>> If you want to look into details, please use reflector to view the code
>> in
>> Microsoft.VisualStudio.Web.dll. You can download the assembly from:
>>
>> http://cid-2fa13ebc6cc8e80f.skydrive.../Microsoft.Vis
>> ualStudio.Web.dll
>>
>>
>> Regards,
>> Allen Chen
>> Microsoft Online Support
>>
>> Delighting our customers is our #1 priority. We welcome your comments and
>> suggestions about how we can improve the support we provide to you.
>> Please
>> feel free to let my manager know what you think of the level of service
>> provided. You can send feedback directly to my manager at:
>> (E-Mail Removed).
>>
>> ==================================================
>> Get notification to my posts through email? Please refer to
>> http://msdn.microsoft.com/en-us/subs...#notifications.
>>
>> Note: MSDN Managed Newsgroup support offering is for non-urgent issues
>> where an initial response from the community or a Microsoft Support
>> Engineer within 2 business day is acceptable. Please note that each
>> follow
>> up response may take approximately 2 business days as the support
>> professional working with you may need further investigation to reach the
>> most efficient resolution. The offering is not appropriate for situations
>> that require urgent, real-time or phone-based interactions. Issues of
>> this
>> nature are best handled working with a dedicated Microsoft Support
>> Engineer
>> by contacting Microsoft Customer Support Services (CSS) at
>> http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
>> ==================================================
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>>
>>



 
Reply With Quote
 
gerry
Guest
Posts: n/a
 
      06-24-2009

for anyone interested :

https://connect.microsoft.com/Visual...dbackID=469940


"gerry" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Sounds like we are SOL on this one due to some 'by design' bug in the
> designer.
> My guess is that the master page designer was created by an entry level
> summer intern who never saw any reason for anyone to ever derive a custom
> placeholder and accordingly they made sure that you couldn't.
>
>
>
> "fruitbatinshades" <(E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
>> Has any progress been made on this issue? I am having the same problem
>> and
>> wondered if it has been addressed or if someone has found a workaround?
>>
>> "Allen Chen [MSFT]" wrote:
>>
>>> Hi Gerry,
>>>
>>> >I looked throught the associated control/designer/builder classes in
>>> >relector but didn't see anything that looked like the culprit.
>>> >One thing I couldn't find was the MasterPageWebFormDesigner which
>>> according
>>> >the MasterPage metadata in vs is supposed to be in
>>> >Microsoft.VisualStudio.Web.dll.
>>> >Either this class does not exist in this dll or reflector doesn't see
>>> >it
>>> for
>>> >some reason.
>>>
>>> This exception is exactly thrown by MasterPageWebFormDesigner. So I
>>> think
>>> it's by design and we cannot do anything to eliminate it. You can submit
>>> a
>>> feedback on the connect site to inform our develop team. Our dedicated
>>> engineers will evaluate your feedback and decide whether to improve it
>>> in
>>> the future.
>>>
>>> https://connect.microsoft.com/Visual...backForm.aspx?
>>> FeedbackFormConfigurationID=3471&FeedbackType=2
>>>
>>> If you want to look into details, please use reflector to view the code
>>> in
>>> Microsoft.VisualStudio.Web.dll. You can download the assembly from:
>>>
>>> http://cid-2fa13ebc6cc8e80f.skydrive.../Microsoft.Vis
>>> ualStudio.Web.dll
>>>
>>>
>>> Regards,
>>> Allen Chen
>>> Microsoft Online Support
>>>
>>> Delighting our customers is our #1 priority. We welcome your comments
>>> and
>>> suggestions about how we can improve the support we provide to you.
>>> Please
>>> feel free to let my manager know what you think of the level of service
>>> provided. You can send feedback directly to my manager at:
>>> (E-Mail Removed).
>>>
>>> ==================================================
>>> Get notification to my posts through email? Please refer to
>>> http://msdn.microsoft.com/en-us/subs...#notifications.
>>>
>>> Note: MSDN Managed Newsgroup support offering is for non-urgent issues
>>> where an initial response from the community or a Microsoft Support
>>> Engineer within 2 business day is acceptable. Please note that each
>>> follow
>>> up response may take approximately 2 business days as the support
>>> professional working with you may need further investigation to reach
>>> the
>>> most efficient resolution. The offering is not appropriate for
>>> situations
>>> that require urgent, real-time or phone-based interactions. Issues of
>>> this
>>> nature are best handled working with a dedicated Microsoft Support
>>> Engineer
>>> by contacting Microsoft Customer Support Services (CSS) at
>>> http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
>>> ==================================================
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>>
>>>
>>>
>>>

>
>



 
Reply With Quote
 
Registered User
Guest
Posts: n/a
 
      06-24-2009

On Wed, 24 Jun 2009 12:03:47 -0400, "gerry" <(E-Mail Removed)>
wrote:

>Sounds like we are SOL on this one due to some 'by design' bug in the
>designer.
>My guess is that the master page designer was created by an entry level
>summer intern who never saw any reason for anyone to ever derive a custom
>placeholder and accordingly they made sure that you couldn't.
>

Abstractly a nested master page can be considered as a custom
ContentPlaceHolder. Depending upon your needs this might be the way to
go.
http://msdn.microsoft.com/en-us/library/x2b3ktt7.aspx
If so you might want to reconsider the entry level summer intern
comment.

regards
A.G.
 
Reply With Quote
 
gerry
Guest
Posts: n/a
 
      06-25-2009

Sorry, but I am not seeing the relevance.
While that may or may not be true abstractly, concretely it would be design
& maintenance nightmare.

Where one can simply drop multiple CustomContentPlaceHolders on a MasterPage
,
a similar scheme using nested masterpaged would involve basing a MasterPage
on a CustomMasterPage which is based on different CustomMasterPage2 which is
based on another different CustomMasterPage3 etc.
So instead of 1 CustomContentPlaceHolders you are suggesting multiple
CustomMasterPages ? I don't even want to think about it.

I stick by my intern comment - I see no valid reason to not be able to use a
custom ContentPlaceHolder the same way we would use any other custom
control.


"Registered User" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Wed, 24 Jun 2009 12:03:47 -0400, "gerry" <(E-Mail Removed)>
> wrote:
>
>>Sounds like we are SOL on this one due to some 'by design' bug in the
>>designer.
>>My guess is that the master page designer was created by an entry level
>>summer intern who never saw any reason for anyone to ever derive a custom
>>placeholder and accordingly they made sure that you couldn't.
>>

> Abstractly a nested master page can be considered as a custom
> ContentPlaceHolder. Depending upon your needs this might be the way to
> go.
> http://msdn.microsoft.com/en-us/library/x2b3ktt7.aspx
> If so you might want to reconsider the entry level summer intern
> comment.
>
> regards
> A.G.



 
Reply With Quote
 
gerry
Guest
Posts: n/a
 
      06-25-2009

Sorry, but I am not seeing the relevance.
While that may or may not be true abstractly, concretely it would be a
design
& maintenance nightmare.

Where one can simply drop multiple CustomContentPlaceHolders on a MasterPage
,
a similar scheme using nested masterpaged would involve basing a MasterPage
on a CustomMasterPage which is based on different CustomMasterPage2 which is
based on another different CustomMasterPage3 etc.
So instead of 1 CustomContentPlaceHolders you are suggesting multiple
CustomMasterPages ? I don't even want to think about it.

I stick by my intern comment - I see no valid reason to not be able to use a
custom ContentPlaceHolder the same way we would use any other custom
control, say a custom Panel.
Even if someone did come with a 'valid' reason it would in all likelihood
still come down to trying to justify simply bad design.


"Registered User" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Wed, 24 Jun 2009 12:03:47 -0400, "gerry" <(E-Mail Removed)>
> wrote:
>
>>Sounds like we are SOL on this one due to some 'by design' bug in the
>>designer.
>>My guess is that the master page designer was created by an entry level
>>summer intern who never saw any reason for anyone to ever derive a custom
>>placeholder and accordingly they made sure that you couldn't.
>>

> Abstractly a nested master page can be considered as a custom
> ContentPlaceHolder. Depending upon your needs this might be the way to
> go.
> http://msdn.microsoft.com/en-us/library/x2b3ktt7.aspx
> If so you might want to reconsider the entry level summer intern
> comment.
>
> regards
> A.G.




 
Reply With Quote
 
Registered User
Guest
Posts: n/a
 
      06-25-2009

On Thu, 25 Jun 2009 13:12:37 -0400, "gerry" <(E-Mail Removed)>
wrote:

>Sorry, but I am not seeing the relevance.
>While that may or may not be true abstractly, concretely it would be a
>design
>& maintenance nightmare.
>
>Where one can simply drop multiple CustomContentPlaceHolders on a MasterPage
>,
>a similar scheme using nested masterpaged would involve basing a MasterPage
>on a CustomMasterPage which is based on different CustomMasterPage2 which is
>based on another different CustomMasterPage3 etc.
>So instead of 1 CustomContentPlaceHolders you are suggesting multiple
>CustomMasterPages ? I don't even want to think about it.
>

Well I admit I'm unaware of your specific needs.

>I stick by my intern comment - I see no valid reason to not be able to use a
>custom ContentPlaceHolder the same way we would use any other custom
>control, say a custom Panel.


One reason might be the functionality of the types and their base
classes (Control vs. WebControl) and the fact that ContentPlaceHolder
implements the INamingContainer interface.
http://msdn.microsoft.com/en-us/libr...aceholder.aspx
"A ContentPlaceHolder control defines a relative region for content
in a master page, and renders all text, markup, and server controls
from a related Content control found in a content page."
That doesn't describe any type derived from the WebControl class.

And of course it doesn't explain the issues with deriving a type from
the ContentPlaceHolder type.

>Even if someone did come with a 'valid' reason it would in all likelihood
>still come down to trying to justify simply bad design.
>

I can't call it a bad design without understanding the additional
functionality the derived type will bring. Perhaps that functionality
could be provided by using Extension methods eliminating the need to
derive from the ContentPlaceHolder type.
http://msdn.microsoft.com/en-us/library/bb383977.aspx

If the intent is to add default content within the custom type
consider the behavior of the base class.
http://msdn.microsoft.com/en-us/libr...aceholder.aspx
"You can specify default content placed within the ContentPlaceHolder
control tags, but this content is replaced by any content in an
associated content page."

The intern comment denigrates the efforts of everyone involved in the
design and production of the .NET framework.

regards
A.G.

>
>"Registered User" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed).. .
>> On Wed, 24 Jun 2009 12:03:47 -0400, "gerry" <(E-Mail Removed)>
>> wrote:
>>
>>>Sounds like we are SOL on this one due to some 'by design' bug in the
>>>designer.
>>>My guess is that the master page designer was created by an entry level
>>>summer intern who never saw any reason for anyone to ever derive a custom
>>>placeholder and accordingly they made sure that you couldn't.
>>>

>> Abstractly a nested master page can be considered as a custom
>> ContentPlaceHolder. Depending upon your needs this might be the way to
>> go.
>> http://msdn.microsoft.com/en-us/library/x2b3ktt7.aspx
>> If so you might want to reconsider the entry level summer intern
>> comment.
>>
>> regards
>> A.G.

>
>

 
Reply With Quote
 
gerry
Guest
Posts: n/a
 
      06-25-2009


"Registered User" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Thu, 25 Jun 2009 13:12:37 -0400, "gerry" <(E-Mail Removed)>
> wrote:
>
>>Sorry, but I am not seeing the relevance.
>>While that may or may not be true abstractly, concretely it would be a
>>design
>>& maintenance nightmare.
>>
>>Where one can simply drop multiple CustomContentPlaceHolders on a
>>MasterPage
>>,
>>a similar scheme using nested masterpaged would involve basing a
>>MasterPage
>>on a CustomMasterPage which is based on different CustomMasterPage2 which
>>is
>>based on another different CustomMasterPage3 etc.
>>So instead of 1 CustomContentPlaceHolders you are suggesting multiple
>>CustomMasterPages ? I don't even want to think about it.
>>

> Well I admit I'm unaware of your specific needs.
>
>>I stick by my intern comment - I see no valid reason to not be able to use
>>a
>>custom ContentPlaceHolder the same way we would use any other custom
>>control, say a custom Panel.

>
> One reason might be the functionality of the types and their base
> classes (Control vs. WebControl)


PlaceHolder & UpdatePanel are also Control based and custom versions work
fine.

> and the fact that ContentPlaceHolder
> implements the INamingContainer interface.


as do Panel , PlaceHolder , View , ListView , Repeater , UpdatePanel , ...
custom versions each work fine

> http://msdn.microsoft.com/en-us/libr...aceholder.aspx
> "A ContentPlaceHolder control defines a relative region for content
> in a master page, and renders all text, markup, and server controls
> from a related Content control found in a content page."
> That doesn't describe any type derived from the WebControl class.
>
> And of course it doesn't explain the issues with deriving a type from
> the ContentPlaceHolder type.
>
>>Even if someone did come with a 'valid' reason it would in all likelihood
>>still come down to trying to justify simply bad design.
>>

> I can't call it a bad design without understanding the additional
> functionality the derived type will bring.


ok - now you are espousing exactly the mind set that I expect is at the
bottom of this issue, that being, that if you, the designer/developer, can't
think of a reason why you would want to derive from a type then you make
sure that nobody can else derive from that type even if they do have a
perfectly good reason to.

> Perhaps that functionality
> could be provided by using Extension methods eliminating the need to
> derive from the ContentPlaceHolder type.
> http://msdn.microsoft.com/en-us/library/bb383977.aspx
>
> If the intent is to add default content within the custom type
> consider the behavior of the base class.
> http://msdn.microsoft.com/en-us/libr...aceholder.aspx
> "You can specify default content placed within the ContentPlaceHolder
> control tags, but this content is replaced by any content in an
> associated content page."


although it is irrelevant to the discussion of this undocumented 'feature'
of the ContentPlaceHolder, in this particular case, the intent was to
override the Render method to capture the rendered content, but I'm sure
there are any number of valid reasons.

>
> The intern comment denigrates the efforts of everyone involved in the
> design and production of the .NET framework.


The comment wasn't directed at the designers/developers of the .NET
framework, just the designer/developer of the web form designer , and if the
shoe fits ...

If the ContentPlaceHolder was intentionally meant to be unusable as a base
class then it should have been sealed.
It also worth noting that the custom ContentPlaceHolder control works just
fine at runtime, this a 100% designer issue.


>
> regards
> A.G.
>
>>
>>"Registered User" <(E-Mail Removed)> wrote in message
>>news:(E-Mail Removed). ..
>>> On Wed, 24 Jun 2009 12:03:47 -0400, "gerry" <(E-Mail Removed)>
>>> wrote:
>>>
>>>>Sounds like we are SOL on this one due to some 'by design' bug in the
>>>>designer.
>>>>My guess is that the master page designer was created by an entry level
>>>>summer intern who never saw any reason for anyone to ever derive a
>>>>custom
>>>>placeholder and accordingly they made sure that you couldn't.
>>>>
>>> Abstractly a nested master page can be considered as a custom
>>> ContentPlaceHolder. Depending upon your needs this might be the way to
>>> go.
>>> http://msdn.microsoft.com/en-us/library/x2b3ktt7.aspx
>>> If so you might want to reconsider the entry level summer intern
>>> comment.
>>>
>>> regards
>>> A.G.

>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
MasterPage - ContentPlaceHolder - How to navigate to the ContentPlaceHolder "Child Page" Greg ASP .Net 4 04-17-2006 03:48 PM
MasterPage - ContentPlaceHolder - How to navigate to the ContentPlaceHolder "Child Page" Greg ASP .Net Web Controls 1 03-23-2006 10:17 AM
Can a <asp:contentplaceholder> generate custom events? Beatniks ASP .Net 0 12-23-2005 06:07 PM
[asp.net2] Masterpage und ContentPlaceHolder ausrichten Sebastian Meier ASP .Net 0 04-23-2005 09:06 PM
master pages contentplaceholder Billy Cormic ASP .Net 3 09-01-2004 03:13 PM



Advertisments