.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Formatting text within a tag

Posted By:      Posted Date: October 01, 2010    Points: 0   Category :ASP.Net

I am using a radio button list. And I have a list item with the following text (see code at the bottom)........Have you or a family member ever been disgnosed or treated for any type of Asthma. I would like the one word Asthma to be italiziced and underlined. when I tried to use html tags within the listitem tag it sai the element is not allowed with the listitem tag. Is this possible?

<asp:RadioButtonList ID="RadioButtonList2" runat="server" RepeatColumns="2"
            <asp:ListItem>Have you or a family member ever been disgnosed or treated for any type of Asthma) Yes</asp:ListItem>

View Complete Post

More Related Resource Links

Formatting Multiple Lined Text Box

I have an expression as  Field!name1.value+VBCRLF+Field!name2.value My requirement is i need to have the first line as bold and rest in normal text in SSRS 2005  

Suffereing with text formatting, whats wrong?

I am outputting a histogram and can't get the labeling of the cells formatted correctly. I want the numbers printed at the bottom of each cell to be centered, but as you can see they are left justified. At the same time the very left number I oversized to see what would happen. This widens the size of the graphic bin which I don't want, I would rather crop the number. What am I missing here, what attributes are missing? I have been playing with this since yesterday and it is driving me nutts. <hbox height="200" width="100" style="border: 2px inset -moz-dialog; margin: 4px;"> <box id="0" flex="1" align="end" width="5%" style="background: -moz-linear-gradient(left, red,red 10%);">2900</box> <box id="1" flex="1" align="end" width="5%" style="background: -moz-linear-gradient(left, red,red 11%);">3</box> <box id="2" flex="1" align="end" width="5%" style="background: -moz-linear-gradient(left, yellow,yellow 12%);">1</box> <box id="3" flex="1" align="end" width="5%" style="background: -moz-linear-gradient(left, yellow,yellow 13%);">1</box> Etc </hbox>

Displaying Rich text with formatting in RDLC file

Hi, I want to display my rich text with formatting in RDLC file. Can anyone please help me with the way out for that? Thanks & Regards, Subalakshmi Vijayarajan.

formatting datapager text


I have a listview control qith a datapager.  I'm using a linkbutton for next and previous.  I have a css class that makes the text Arial, and bold.  It also sets the size to 10px.  When I run the page, the link button is Arial and bold, but I can't change the size of the text.  I've tried setting it to 10px, 8px, even 5px, 10pt,  and xx-small.  Nothing changes the font size. 

My customer wants the next and previous buttons to look a certain way.  I'll have to manage paging manually if I can't get this figured out. 

Formatting search results -- is there any good way to flip colors on text being searched for?


I have a mobile website that allows you to search on three different criteria and dsiplay the results in a gridview.  I thought it would be easy to modify it so that when the results are displayed, the field that was searched would display the sought text string with the colors reversed, as is the style for so many search engines.  So I began modifying the rowdatabound() event, searching the relevant field for the search string, sandwiching the search string inside a <FONT> block with the reverse colors wherever it was found, and assigning the result back to the control that the field was bound to.

I don't seem to be having much luck.  No matter what kind of control I use -- which includes textbox, label, and literal, all I can ever get is a BLANK where the reversed-colors text is supposed to be.  If I use the <FONT> block with the normal colors, I can still see the text, but if I try to reverse them (or use different colors), all I can get is the blank space.

So to state the problem succinctly:  Using the rowdatabound() event, you want to display a block of text inside of a conrol inside of a gridview with one word displayed in the reverse of the normal foreground and background colors.  What kind of control would you use?  (Note: The field

Does SSRS 2008 Support Rich Text Formatting?

Couldn't find any recent responses to this. Does anyone know if the 2008 version supports rich text formatting? Thanks

Multiline Gridview and Formatting with Long Text SQL ASP




I have a long text in SQL and passing it to a gridview. I am trying to make the gridview result display in a multiline scroll. I have tried the following code but to no avail. Can someone please assist? Additionally, the text in the gridview result is not in the same format as where it came from, eg. Word. That is the format such as bullet points and multiple spaces are removed. So what is left is a lenghty long string. Please help.





<asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
                <asp:TemplateField HeaderText="description" SortExpression="description">
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("description") %>' TextMode="MultiLine" ></asp:TextBox>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("description") %>' TextMode="

How to save formatting from a multi-line text box into SQL 2005


Hi Everyone,

I have a web form that has a few multi-line text box controls which the user will enter lots of information in paragraphs.  How can I persist their line breaks and tabs into SQL 2005 so that when the information is retrieved on a different page; the line breaks and formatting is preserved?

Thank you!


AutoCompleteStringCollection for text box in DataGridView 2.0

I have been searching for a way to have autocomplete in a DataGridTextBox
object. There does not appear to be an obvious way to do this like you would
for a TextBox outside of a grid using the AutoCompleteCustomSource. Any
thoughts on how I can add this collection? :)

Built-in Functions - Text and Image Functions in SQL Server

Text and image functions operate on TEXT, NTEXT and IMAGE data types. These data types are deprecated with SQL Server 2005 and should be replaced by VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) when possible. Alternatively you can also consider storing large string values using XML data type. Text and image functions are nondeterministic.

Future versions of SQL Server will not support TEXT, NTEXT and IMAGE data types. Columns with TEXT / NTEXT data type do not support commonly used string functions such as LEN, LEFT, RIGHT, etc. Furthermore, due to the large size of TEXT data you''re likely to see performance issues if you store such data in the database. However, at times you can''t help but use the TEXT / NTEXT / IMAGE data types (for example when supporting 3rd party databases when you cannot change the schema) - this is when text and image functions come in handy.

Built-in Functions - Text and Image Functions

Text and image functions operate on TEXT, NTEXT and IMAGE data types. These data types are deprecated with SQL Server 2005 and should be replaced by VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) when possible. Alternatively you can also consider storing large string values using XML data type. Text and image functions are nondeterministic.

Conversion of text files from ANSI to UTF-8

reading and writing text files in ANSI format and
writing html-files in Charset ISO-8859-1 (Western Europe).

Text to Voice

Text to Voice and Voice to Text convert

Voice to Text conversion:-

reference from menubuttons to text parts in article on the same page


Hi, I'm searching now for hours but couldn't find it.Cry

In my menu i have several buttons which (by a <a href..) should go the a part of an article that is in the same form.

Menu button : What is a database should go to the page default.aspx and in there is an article published.
A part of this article is having a piece of text about "what is a database"

Menu button: how to make a query should go to this same article in the same page but then to the part that is have the piece about the query. The next could be an example of what i'm doing:

    <li><a href="default.aspx ?????>what is a database</a></li>
    <li><a href="default.aspx ?????>what is a query</a></li>

Where my question marks are, there should be a connection to that particular piece of text.
In each article part there is an ID="text1" and the second part id="text2"

How shoudl i do that, Should i use a question mark.
Please give me some guidance how to structure the <li> statement or a pointer where I can read about it.


text editor


 I format lines in a .aspx file (source view) the way I can use them, and if I switch to design view or view in browser or debug, the many lines get reformatted to flow all onto one line.

I can't seem to find the correct setting to keep this from happening.

Any suggestions?


Unique text value in databse column


Hi Everyone!

I know this is probably a very basic question but how do I keep a column's text values unique in SQL server (ie for a unique username)?  The column is not an integer it's varchar(50), and it's not the primary key but I could make it the primary key if recommended.

The front end could handle it;  where the user would enter text, it's validated, then a query is done to see if that username is available.  If so, then user can decide to choose it and an insert is done, if not they pick a new username and process repeats.  With this approach, the responsibility of keeping the value unique solely rests on the front end, nothing on the database side.

Is this the correct way to handle this? 

Thank you!


date formatting


I have a 3 field table in sql server express and one of the columns is a date.

I'm trying to pull that in and publish to a gridview, but when I do it comes in with the date and minutes and seconds, etc.

How can I format that so that I only publish MM/DD/YYYY?

thanks in advance 

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend