?
Solved

C# ASp.net  InputFormTextBox Html issue

Posted on 2014-09-15
1
Medium Priority
?
601 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 13

Accepted Solution

by:
Jitendra Patil earned 2000 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

752 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