473,414 Members | 1,636 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,414 software developers and data experts.

how can I write text from codebehind to html - without html rendering

Hi,
How can I write text from code behind without getting HTML tags added to it?
Up till now I used the label control. But when I call the label.text =
"something" then the HTML will output "<span>something</span>", and I want
to write "something" without any tags around it. (this is a simplified
example of course).

(response.write from the codebehind adds the text to the beginning of the
page.)

How can this be done?

Thanks,

Leo
--

-----------------------------------------------
Leo Muller ìéàå îéìø
Webmaster Keshet Interactive
Le********@Keshet-TV.com
03 - 7676383 / 067 - 972985
--------------------------------------
http://www.keshet-i.com
http://www.mooma.com
http://www.hakasefet.co.il
http://www.bip.co.il
http://www.keshet-tv.com


Nov 18 '05 #1
3 2818
Checkout the Literal control.

-- Alex Papadimoulis

"Leo Muller" <le***@keshet-i.com> wrote in message
news:c7**********@news2.netvision.net.il...
Hi,
How can I write text from code behind without getting HTML tags added to it? Up till now I used the label control. But when I call the label.text =
"something" then the HTML will output "<span>something</span>", and I want
to write "something" without any tags around it. (this is a simplified
example of course).

(response.write from the codebehind adds the text to the beginning of the
page.)

How can this be done?

Thanks,

Leo
--

-----------------------------------------------
Leo Muller ìéàå îéìø
Webmaster Keshet Interactive
Le********@Keshet-TV.com
03 - 7676383 / 067 - 972985
--------------------------------------
http://www.keshet-i.com
http://www.mooma.com
http://www.hakasefet.co.il
http://www.bip.co.il
http://www.keshet-tv.com

Nov 18 '05 #2
Thanks!

"Alex Papadimoulis" <al***@papadimoulis.com> wrote in message
news:OM**************@TK2MSFTNGP11.phx.gbl...
Checkout the Literal control.

-- Alex Papadimoulis

"Leo Muller" <le***@keshet-i.com> wrote in message
news:c7**********@news2.netvision.net.il...
Hi,
How can I write text from code behind without getting HTML tags added to

it?
Up till now I used the label control. But when I call the label.text =
"something" then the HTML will output "<span>something</span>", and I want to write "something" without any tags around it. (this is a simplified
example of course).

(response.write from the codebehind adds the text to the beginning of the page.)

How can this be done?

Thanks,

Leo
--

-----------------------------------------------
Leo Muller ìéàå îéìø
Webmaster Keshet Interactive
Le********@Keshet-TV.com
03 - 7676383 / 067 - 972985
--------------------------------------
http://www.keshet-i.com
http://www.mooma.com
http://www.hakasefet.co.il
http://www.bip.co.il
http://www.keshet-tv.com


Nov 18 '05 #3
Try adding a SPAN to to your html with the runat set

<SPAN id="myText" runat="server"></SPAN

You can then access the text from the codebehind using the follow

myText.innerHTML = "Blah Blah Blah <B>Bold Blah</B>

Oliver
Nov 18 '05 #4

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

Similar topics

13
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
3
by: peter pilsl | last post by:
When putting a picture with an alt-text to Internetexplorer, the content of the ALT-Text is displayed when the mouse is moving over the picture. This is not what I expected. The ALT-text should...
4
by: CGuy | last post by:
Hi Gurus, I have a rather unique requirements in my ASP.NET application - I need to create image buttons on the fly while rendering a page. The scenario is like this - the user can enter some...
7
by: Chris | last post by:
Hi, On a webform do I have a label, a textBox (txtName) and a submit-button (all asp server controls) : Upon pressing the button do I write the entered name in the html-output stream (at...
1
by: nospamjac | last post by:
Hi, Is there a way to update the text of an asp:label on a webform without refreshing the entire page? What is called by button clicks and other events that refresh a webform control? See the...
11
by: Tony | last post by:
Is it me, or is document.write just about the most abused js function? Maybe, like goto, js would be better without it? Is there any good reason to use it? Because I'm having a hard time seeing...
18
by: ~john | last post by:
Sorry if this is a dumb question buy my CSS is pretty bad... but how do I get text to center vertically within a div tag? Here's my code below... the text is displaying on the far top-right. I...
29
by: Michael Bulatovich | last post by:
Is there a way to use CSS to format "plain" text in an html document. By plain I mean text which is not contained by <por <h#tags. Is there no way to control how this stuff is rendered? tia
28
by: eastcoastguyz | last post by:
I'm a newbie to CSS, so be kind. :-) I have looked at examples of CSS and have not seen this yet. How can you change the colors of the text in the same word in CSS? For example, when how can you...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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
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
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
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.