Masterpages and Response.Write prblem

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
 
P

Patrice

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....
 
M

Mark Rae [MVP]

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top