473,839 Members | 1,395 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can an asp:textbox produce HTML?

Hi, I have this in my asp.net 1.1 page:

<asp:textbox id="Comment" tabIndex="4" runat="server"> </asp:textbox>

Inside the tags, say I have:

<b>I am bold.</b>

When I run the page I get the tags, the HTML, with the sentence. But
how can I get it to render the sentence bold using the tags?

Thank you.

Mar 6 '06 #1
5 1485
The asp.net control is just parsed using a huge regex and turned into
an <input> or <textarea> HTML tag. To support styling, you need an
editable iframe or div. Take a look at http://www.freetextbox.com/ they
have already done it for you.

Mar 6 '06 #2
An asp.net textbox renders as <input type=text...>. You can attach a style
to it, but you can use it as an html-enabled editor because it is not.

Eliyahu

<ne***********@ gmail.com> wrote in message
news:11******** **************@ e56g2000cwe.goo glegroups.com.. .
Hi, I have this in my asp.net 1.1 page:

<asp:textbox id="Comment" tabIndex="4" runat="server"> </asp:textbox>

Inside the tags, say I have:

<b>I am bold.</b>

When I run the page I get the tags, the HTML, with the sentence. But
how can I get it to render the sentence bold using the tags?

Thank you.

Mar 6 '06 #3
Obviously, I meant you can't use it as ...

Eliyahu

"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message
news:uy******** ******@TK2MSFTN GP14.phx.gbl...
An asp.net textbox renders as <input type=text...>. You can attach a style
to it, but you can use it as an html-enabled editor because it is not.

Eliyahu

<ne***********@ gmail.com> wrote in message
news:11******** **************@ e56g2000cwe.goo glegroups.com.. .
Hi, I have this in my asp.net 1.1 page:

<asp:textbox id="Comment" tabIndex="4" runat="server"> </asp:textbox>

Inside the tags, say I have:

<b>I am bold.</b>

When I run the page I get the tags, the HTML, with the sentence. But
how can I get it to render the sentence bold using the tags?

Thank you.


Mar 6 '06 #4

Chris wrote:
The asp.net control is just parsed using a huge regex and turned into
an <input> or <textarea> HTML tag. To support styling, you need an
editable iframe or div. Take a look at http://www.freetextbox.com/ they
have already done it for you.


Either I do not understand you response, or I was not clear. Change it
from a textbox to a label with this:

<asp:Label Text='<%# DataBinder.Eval (Container.Data Item, "Comments") %>
' runat="server" />

In the database there is HTML surrounding the text. Can I make it show
up rendered with the HTML in the label control?

Thanks again for any help.

Mar 6 '06 #5

ne***********@g mail.com wrote:
Chris wrote:
The asp.net control is just parsed using a huge regex and turned into
an <input> or <textarea> HTML tag. To support styling, you need an
editable iframe or div. Take a look at http://www.freetextbox.com/ they
have already done it for you.


Either I do not understand you response, or I was not clear. Change it
from a textbox to a label with this:

<asp:Label Text='<%# DataBinder.Eval (Container.Data Item, "Comments") %>
' runat="server" />

In the database there is HTML surrounding the text. Can I make it show
up rendered with the HTML in the label control?

Thanks again for any help.


Yes HTML will render correctly for a label control, as it just renders
as a DIV or SPAN html tag.

Mar 7 '06 #6

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

Similar topics

6
7903
by: Alex | last post by:
I am a newbie to ASP.NET... What I was trying to do... but yet to succeed in... I am building a customer info database... and on default, I want to display the customer's basic information in the TextBox on Page_Load... but, also allow user to update the information For example: Street1 of the home address
2
8066
by: moondaddy | last post by:
I want to change the border of a asp.net textbox to thin-solid-blue but when I set the cssclass property to a class in the stylesheet, the border properties in the stylesheet don't have any effect on the textbox's appearance. however if I write a style attribute into the textbox tag like the sample below the border looks like I want: style="BORDER-RIGHT:steelblue 1px solid; BORDER-TOP:steelblue 1px solid; BORDER-LEFT:steelblue 1px solid;...
1
12305
by: Ed West | last post by:
Hello, How can I put a textbox control into a cell of an asp:Table? I was not able to do it from the properties sheet, so I put it in via html tab, but now I can't select it from the Design tab (nor select it from the Properties tab on the right). Any ideas? <asp:Table id="Table1" runat="server"> <asp:TableRow> <asp:TableCell Text="Email:"></asp:TableCell>
3
1817
by: Dave | last post by:
I have a button that calls a JavaScript. I need to get the value in an asp:TextBox field to the javascript, either as a parameter or via some mechanism within the JavaScript itself. Any Ideas? TIA, Dave
0
1445
by: Luis Esteban Valencia | last post by:
am trying to databind within an asp:textbox control. I have tried many variations found here but nothing seems to work. It works fine if I use a regular HTML textbox input though. Here is what I have tried: <asp:textbox id='<%#DataBinder.Eval(Container.DataItem, "EmailID")%>' cssclass="textbox" runat="server"><%#DataBinder.Eval(Container.DataItem, "Email")%></asp:textbox> I get '<%# DataBinder.Eval(Container.DataItem,...
3
2387
by: Chris | last post by:
I am trying to use a calendar popup to populate a date in a textbox. I am using the example described in this article: http://aspnet.4guysfromrolla.com/articles/030202-1.aspx However, this article uses a regular HTML input box, and I need to use an ASP Web control textbox. When the latter is rendered in the browser, some extra stuff like _ctl0 is added to the name of the textbox. So the calendar can't find the box to populate it.
3
2132
by: Patrick | last post by:
Try to put in a TextBox next month's date in format (MMM yyyy). The following does NOT work, why is that? <!--When rendered, the texbox is blank, although the text in the round bracket after the textbox is rendered correctly as (July, 2005)--> <asp:TextBox id="MonthTextBox" runat="server"><%=System.DateTime.Now.ToString("y")%></asp:TextBox> (<%=System.DateTime.Now.ToString("y")%>) <!--Same again. defaultMonth is initialised as early...
1
1367
by: Mark Rae | last post by:
Hi, Have been modifying a piece of JavaScript I found on the net which completely prevents the Google AutoFill Toolbar from doing its stuff... Got that working now but, while I was debugging it, I noticed that every field that the Google Toolbar turned yellow also had its border style changed... Seems that this is a standard "feature"... If you specify an <asp:TextBox>'s BackColor property, that also changes its border style - has...
0
3509
by: sjickells | last post by:
Hi I am having a problem using asp:TextBox's in a transparent table. I have a background image on the page and a table in the middle of the page. I have set the background colour of the table to white the used CSS to set the opacity to 90 so that you can see the background image through the table. The problem I am having is with the textboxes in the transparent
0
9856
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, 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...
0
10914
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10597
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 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...
1
10656
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,...
0
10299
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 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...
0
7022
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();...
0
5684
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4495
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 we have to send another system

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.