473,413 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Noob question about returning HTML

Hi, I have a simple web page which has a file upload section, where the user
can select a file, hit the upload button, and then view details about the
file, which appear underneath the upload section.

The information about the file will be returned as XHTML, therefore I want a
control on the web form which is just a container for HTML so that in my
code behind file I can do something like:

// if file has successfully uploaded

htmlContainer.Text = "<table><tr><td>Whatever details</td></tr></table>";

I can't seem to find an appropriate control. What am I missing? apart from
a brain.

I could use the Response class, but I don't want to lose the file upload
section at the top of the form.
Nov 19 '05 #1
2 979
The correct way would be to look at using a placeholder control and put
other controls in it - like table controls or labels.
--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"ToChina" <in*****@email.address> wrote in message
news:uK*****************@text.news.blueyonder.co.u k...
Hi, I have a simple web page which has a file upload section, where the
user can select a file, hit the upload button, and then view details about
the file, which appear underneath the upload section.

The information about the file will be returned as XHTML, therefore I want
a control on the web form which is just a container for HTML so that in my
code behind file I can do something like:

// if file has successfully uploaded

htmlContainer.Text = "<table><tr><td>Whatever details</td></tr></table>";

I can't seem to find an appropriate control. What am I missing? apart
from a brain.

I could use the Response class, but I don't want to lose the file upload
section at the top of the form.

Nov 19 '05 #2
"John Timney (ASP.NET MVP)" <ti*****@despammed.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
The correct way would be to look at using a placeholder control and put
other controls in it - like table controls or labels.
--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director


I've found a method that works - I don't know if there's anything wrong with
it, but basically I've added the following to the web form:

<div id="container" runat="server"></div>

and then in the code behind I have this:

protected System.Web.UI.HtmlControls.HtmlContainerControl container;

container.InnerHtml = "<table>...</table>";

now the HTML gets rendered right on the page.
Nov 19 '05 #3

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

Similar topics

21
by: dogu | last post by:
I'm missing something and need a push in the right direction. If I create a php file with the following content, and call it via a browser, it works as expected. <?php echo "hello world"; ?> ...
7
by: CJM | last post by:
I'm finally taking my first few steps with ASP.NET, and I'm just workign my way through some of the basics. As a vehicle for my learning, I'm re-writing a simple report page for on of my ASP...
2
by: Nonee | last post by:
Hello- I am writing a program that loads a tv guide listing into a control. I looked at the datagridview control but it doesn't seem to have the ability to overlap columns. Basically, I would...
2
by: Link360 | last post by:
Im a complete noob and im proud of it. I am excited in learning everything about the C++ language. Right now im trying to make tic-tac-toe. Go ahead laugh. here is what i have so far ...
3
by: Mr. Roper | last post by:
I'm pretty weak when it comes to Java script, hopefully someone will take mercy on my sole and explain this to me. How come on the following HTML page, when I have my first script tag commented...
2
by: Carnell, James E | last post by:
I am thinking about purchasing a book, but wanted to make sure I could get through the code that implements what the book is about (Artificial Intelligence a Modern Approach). Anyway, I'm not a...
18
by: Ixiaus | last post by:
I have recently (today) just started learning/playing with Python. So far I am excited and impressed (coming from PHP background). I have a few questions regarding Python behavior... val =...
2
by: kj | last post by:
I'm a Python noob, and haven't yet figured out my way around the Python documentation. For example, suppose I learn about some great module foo.bar.baz, and when I run the python interpreter and...
1
by: Fluffy654 | last post by:
First off I am a complete noob when it comes to doing anything with servers. I'm just beginning to learn today because I need to start adding SSI to my websites. I apologise in advance if I am making...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
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...
0
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...
0
tracyyun
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...
0
agi2029
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,...
0
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...

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.