Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how can I write text from codebehind to html - without html rendering

Reply
Thread Tools

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

 
 
Alex Papadimoulis
Guest
Posts: n/a
 
      05-06-2004
Checkout the Literal control.

-- Alex Papadimoulis

"Leo Muller" <leo-> wrote in message
news:c7ddah$96h$...
> 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
>
> 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
>
>
>
>



 
Reply With Quote
 
 
 
 
=?Utf-8?B?T2xpdmVy?=
Guest
Posts: n/a
 
      05-06-2004
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
 
Reply With Quote
 
 
 
 
Leo Muller
Guest
Posts: n/a
 
      05-06-2004
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

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




 
Reply With Quote
 
Leo Muller
Guest
Posts: n/a
 
      05-06-2004
Thanks!

"Alex Papadimoulis" <> wrote in message
news:...
> Checkout the Literal control.
>
> -- Alex Papadimoulis
>
> "Leo Muller" <leo-> wrote in message
> news:c7ddah$96h$...
> > 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
> >
> > 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
> >
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get inner html of an HTML element from codebehind file eggie5@gmail.com ASP .Net 5 10-07-2006 04:04 AM
IE6 SP1 rendering vs IE6 SP2 rendering Peter Mount HTML 4 01-31-2006 08:01 AM
Re: It seems that ZipFile().write() can only write files,how can empty directories be put into it? Jeff Epler Python 0 07-01-2005 02:06 PM
It seems that ZipFile().write() can only write files,how can empty directories be put into it? could ildg Python 0 07-01-2005 01:50 AM
Urgent!!!!!!!! read the values in text boxes without rendering during postback Ravindra ASP .Net 2 12-19-2003 07:30 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57