Solved

C# ASp.net  InputFormTextBox Html issue

Posted on 2014-09-15
1
566 Views
Last Modified: 2014-09-25
Hi,
I used following code to create  InputFormTextBox, When i copy from excel sheet some records it will automatically creating
unnessary codes. See below

<P>
<TABLE style="WIDTH: 48pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=64 border=0>
<COLGROUP>
<COL style="WIDTH: 48pt" width=64>
<TBODY>
<TR style="HEIGHT: 17.25pt" height=23>
<TD style="BORDER-TOP: #f0f0f0; HEIGHT: 17.25pt; BORDER-RIGHT: #f0f0f0; WIDTH: 48pt; BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent" height=23 width=64><FONT face=Calibri>Test<FONT class=font5><SUP>2</SUP></FONT></FONT></TD></TR></TBODY></TABLE></P>


I need only copying and paste to InputFormTextBox ,Please some one show me how to do.I already Ask user to enter
starting point £ and end of sentance £,throught that im removing HTML code,But its time consuming,so any one show me any better way or how to avoid this issue
Expected Results

Test<SUP>2</SUP>

Open in new window


Seebelow my C# code How to creating InputFormTextBox

private InputFormTextBox richTextEditor

     richTextEditor = new InputFormTextBox();
            richTextEditor.RichText = true;
            richTextEditor.RichTextMode = SPRichTextMode.FullHtml;
            richTextEditor.TextMode = TextBoxMode.MultiLine;
           

            richTextEditor.Width = System.Web.UI.WebControls.Unit.Percentage(100);  
            richTextEditor.Rows = 10;
           
            richTextEditor.Enabled = true;
            richTextEditor.Visible = true;
            //Panel1.Controls.Add(richTextEditor);
            Panel_Disclaimer.Controls.Add(richTextEditor);
0
Comment
Question by:ukerandi
1 Comment
 
LVL 12

Accepted Solution

by:
jitendra patil earned 500 total points
ID: 40332051
hi ukerandi,

first of all, let me tell you i am not a sharepoint guy, but i will try my best to solve your issue, as i have little knowledge of SP.

as per your code you are providing the SPRichTextMode.FullHtml;  which means it will  Display enhanced rich text, including pictures, tables, and hyperlinks.

you can try with Compatible mode which says  it will Display plain text, or display rich text with bold, italic, or text alignment

for your reference you can check the below link
SPRichTextMode enumeration

as you are using a RichTextbox editor with fullhtml mode it will automatically generate an HMTL for what ever text you provide in it,
copy and pasting from Excel includes Table, due to which it includes the above HTML code for particular record.

Hope this helps.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now