0

Hi.
I have retrieve my data from excel files to a vb richtextbox but the text with boldness,italics or sup/sub-scripts format are not proper is their any
way i can retrieve richtext(text having boldness,italics or sup/sub-scripts) on vb form ???

3
Contributors
5
Replies
6
Views
10 Years
Discussion Span
Last Post by virus220
0

Hi.
I have retrieve my data from excel files to a vb richtextbox but the text with boldness,italics or sup/sub-scripts format are not proper is their any
way i can retrieve richtext(text having boldness,italics or sup/sub-scripts) on vb form ???

are you using webform, or windows forms?

0

actually right now i ready to work with any of the forms i just want it to work pls reply??

0

you should add HTML tags to your text in order to display the formatted text in a Webform:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;


public partial class InsertRecord : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string strVar = "<b>Hello <sup>World</sup></b>";
Label1.Text = strVar.ToString();
Response.Write(strVar.ToString());
}
}

Regards,
Khaled

Edited by happygeek: fixed formatting

0

You mean from a RichTextbox control (or whatever the name is)? There should be a RichText (or similar) property, which will give you the contents with formatting codes still included (as opposed to the Text property, which is just the plaintext). Converting that to HTML will probably require another function, which someone might have put on the Internet somewhere...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.