Solved

C# ASp.net  InputFormTextBox Html issue

Posted on 2014-09-15
1
573 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hey Audio! 3 30
Creating a route in asp.net webforms 2 28
FTP file download using c# 3 23
Convert Select to DropDownListFor MVC 5 2 16
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 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