471,075 Members | 771 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,075 software developers and data experts.

Master Page and Web User Control Problem

Hi everyone,

I have placed a simple Web User Control (Response.Write("hello")) on
my page which uses a Master Page to test this problem that we have.
Every time I run the web app it displays
the word "hello" at the top of the Master Page. Why is that? Why
doesn't it display it where you want it to display it? Isn't a Web User
Control sort of like place holder?
Example. Default.aspx contains
1
2
3
Reference to my Web User Control to display 'hello'

When I execute it I get
hello
1
2
3
Instead of hello appearing at the end.

Thanks
MA

May 24 '06 #1
1 1122
Response.write does display at the top - not sure why - possibly something to
do with compile time.
Try adding label controls to your page, then setting the Label1.Text
property from your code behind. This way you can separate your display from
your code.
Hope this helps
Andy

"mazdotnet" wrote:
Hi everyone,

I have placed a simple Web User Control (Response.Write("hello")) on
my page which uses a Master Page to test this problem that we have.
Every time I run the web app it displays
the word "hello" at the top of the Master Page. Why is that? Why
doesn't it display it where you want it to display it? Isn't a Web User
Control sort of like place holder?
Example. Default.aspx contains
1
2
3
Reference to my Web User Control to display 'hello'

When I execute it I get
hello
1
2
3
Instead of hello appearing at the end.

Thanks
MA

May 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Michael Herman \(Parallelspace\) | last post: by
4 posts views Thread by rmccinc | last post: by
7 posts views Thread by Martijn Saly | last post: by
2 posts views Thread by Scott | last post: by
1 post views Thread by yoknows | last post: by
4 posts views Thread by Diane Yocom | last post: by
reply views Thread by robgallen | last post: by
10 posts views Thread by =?Utf-8?B?RGFuaQ==?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.