473,803 Members | 3,637 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 1483
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
7902
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
12298
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
1441
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
2386
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
2129
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
1364
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
3507
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
9703
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
10316
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...
0
10069
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...
1
7604
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 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...
0
5500
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
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
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
2
3798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
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...

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.