473,503 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Response.write in UserCOntrol

In my usercontrol I want to use response.write in code behind to write HTML
to the page. However it outputs at the top of the page and I want the output
at the bottom, beneath the controls. How can I do this? Or is there a better
way than response.write to do what I want?

--
Peter Aitken

Remove the crap from my email address before using.
Nov 18 '05 #1
5 4673
use an asp:Label control, then populate it, that's what it's for.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Peter Aitken" <pa*****@CRAPnc.rr.com> wrote in message
news:ui**************@tk2msftngp13.phx.gbl...
In my usercontrol I want to use response.write in code behind to write HTML to the page. However it outputs at the top of the page and I want the output at the bottom, beneath the controls. How can I do this? Or is there a better way than response.write to do what I want?

--
Peter Aitken

Remove the crap from my email address before using.

Nov 18 '05 #2
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
use an asp:Label control, then populate it, that's what it's for.
--
Curt Christianson


I don't think so - I need to write HTML with headings, tables, etc.
--
Peter Aitken

Remove the crap from my email address before using.
Nov 18 '05 #3
All HTML in an ASP.Net page is objects on the server at runtime (yes, even
"static" HTML). ASP.Net is object-oriented. Response.Write is procedural.
For this reason, a Page is populated by creating objects and placing them in
its Controls Collection. The properties of the objects create the HTML in
the page.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Peter Aitken" <pa*****@CRAPnc.rr.com> wrote in message
news:ui**************@tk2msftngp13.phx.gbl...
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
use an asp:Label control, then populate it, that's what it's for.
--
Curt Christianson


I don't think so - I need to write HTML with headings, tables, etc.
--
Peter Aitken

Remove the crap from my email address before using.

Nov 18 '05 #4
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:OQ*************@tk2msftngp13.phx.gbl...
All HTML in an ASP.Net page is objects on the server at runtime (yes, even
"static" HTML). ASP.Net is object-oriented. Response.Write is procedural.
For this reason, a Page is populated by creating objects and placing them in its Controls Collection. The properties of the objects create the HTML in
the page.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP


Thanks. I discovered that I can do what I want by including the following
tag on the page:

<span id="report" runat="server"></span>

Then including this code in the code behind:

report.innerHTML="whatever"
--
Peter Aitken

Remove the crap from my email address before using.
Nov 18 '05 #5
that's no different then an asp:Label in the end.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Peter Aitken" <pa*****@CRAPnc.rr.com> wrote in message
news:eq**************@TK2MSFTNGP10.phx.gbl...
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:OQ*************@tk2msftngp13.phx.gbl...
All HTML in an ASP.Net page is objects on the server at runtime (yes, even "static" HTML). ASP.Net is object-oriented. Response.Write is procedural. For this reason, a Page is populated by creating objects and placing them
in
its Controls Collection. The properties of the objects create the HTML

in the page.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP


Thanks. I discovered that I can do what I want by including the following
tag on the page:

<span id="report" runat="server"></span>

Then including this code in the code behind:

report.innerHTML="whatever"
--
Peter Aitken

Remove the crap from my email address before using.

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2803
by: Gary | last post by:
I am having a strange problem that I cannot solve. I have an asp page that I use for a user to login and gain access to other pages. When the user logs in I set a couple of session variables like...
13
4719
by: TinyTim | last post by:
I'm a newbie at ASP & HTML. It seems that when you use server side code and you're going to return a customized HTML form with several fields and labels, you have to do an extensive amount of...
2
14254
by: Reena | last post by:
Hi, Working on .NET 2003. Using C# as server code. I have created a class with following code... using System; using System.Data.OracleClient; using System.Web; using...
2
2443
by: John Cosmas | last post by:
If I included a UserControl in a form, and them tell it to Response.Write some code, will the resulting client script work after the page is rendered. Let's say that I instructed the User Control...
10
2476
by: George G. | last post by:
Hi there, I am busy writing a new asp.net application and I am reusing some of my existing asp functions and methods in a user control. I need access to session, request and response in some of...
2
4591
by: Sascha | last post by:
Hi there, I searched carefully through the web before finally deciding to post this message, because I could not find a solution for my problem. Hopefully someone will have a hint or explanation...
41
4237
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
1
2055
by: Max2006 | last post by:
Hi, I have a user control that shows the contents of potentially big html files. To save the server memory, I try to avoid reading the whole large-file's text into a label or literal...
6
12117
by: MeowCow | last post by:
I have created a UserControl that encapsulates a third party data grid. My goal was to create my own DataSource and DataMember properties that forward the binding to the third party grid, then use...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7011
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4689
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.