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. 5 4682
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******** ******@tk2msftn gp13.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.
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.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.
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******** ******@tk2msftn gp13.phx.gbl... "Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message news:%2******** ********@TK2MSF TNGP11.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.
"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:OQ******** *****@tk2msftng p13.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.innerHTM L="whatever"
--
Peter Aitken
Remove the crap from my email address before using.
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******** ******@TK2MSFTN GP10.phx.gbl... "Kevin Spencer" <ks******@takem pis.com> wrote in message news:OQ******** *****@tk2msftng p13.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.innerHTM L="whatever"
-- Peter Aitken
Remove the crap from my email address before using.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 Session("UserType") = "Sales". Then based on the Session("UserType") I use response.redirect to take the user to a specific page. The logic and response.redirect works fine on a Win2k server but when I move the page to a server running Win2003 the...
|
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
Response.Writes.
Are there any tools that will let you design the form then convert
that form to Response.Writes that you can further customize with ASP
logic? For instance: use Dreamweaver to design the form, then another
program to convert to...
|
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 System.Web.SessionState;
|
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 in the form, to Response.Write
a Window.Open instruction...
John Cosmas
|
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 the functions and I can't find out
how to do it. Here is an example of what I do and I get the following
Cannot refer to an instance member of a class from within a shared method or
shared member initializer without an explicit instance of the...
| |
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 for me! I apologize
for the length of this posting, but I wanted to make sure that I get an
answer other than "Hey man, just use LoadControl!", because this is not
what I want.
The Task: Isolate a collection of web forms which are created as
|
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 on some
initialization information obtained elsewhere. Basically, I'm going to
create my own dynamic toolbar where the toolbarbuttons can change. I'm not
using the VB toolbar because of limitations in changing things like
backcolor (I can't get...
|
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 control. Therefore, I tried to use this code in
the user control's code behind:
|
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 binding like
normal.
The problem I am running into is that my UserControl ends up with a
different BindingContext then the ParentForm it is contained in and
thus all other controls on the parent form. (I want various controls
on the form to...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |