Masterpages and Response.Write prblem

  • Thread starter Thread starter Sagaert Johan
  • Start date Start date
S

Sagaert Johan

Hi

I have a page based on a masterpage:

when i use Response.Write then the markup appears in the masterpage content
location and not in the content of the page itself
(not in the location of the contentplaceholder of the masterpage.)

Any workaround ?

Johan
 
Use a placeholder or a label control to control were this content is
placed...

This is not specific to masterpage. The whole idea of ASP.NET is to have a
server side programming model you work with that will then render the HTML
markup once all is ready. Using Response.Write interferes with this
principle....
 
I have a page based on a masterpage:

When i use Response.Write then the markup appears in the masterpage
content location and not in the content of the page itself
(not in the location of the contentplaceholder of the masterpage.)

Any workaround ?

As Patrice mentioned, try to avoid Response.Write in ASP.NET if you possibly
can - in almost every situation, it's the wrong solution...
 
Back
Top