?
Solved

copy-paste from Word into an asp.net textBox!?

Posted on 2014-11-24
1
Medium Priority
?
568 Views
Last Modified: 2014-11-25
Hi,

Some of my users copy-paste text from Word into a textbox on my ASP.NET webform, resulting in ? (question marks) being saved if the text contained some special Word character (like Word's apostrophes etc). How can I prevent or resolve this?

Thanks a lot!
0
Comment
Question by:Xeronimo
[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 17

Accepted Solution

by:
selvol earned 2000 total points
ID: 40461962
class MyInputBeaviour : InputBehavior
{
    public MyInputBeaviour(DocumentView view) : base(view)
    {
    }
 
    protected override bool ProcessKeyDownCore(KeyEventArgs e)
    {
        if (e.Control && e.KeyCode == Keys.V)
        {
             
            RadDocument document = this.DocumentView.Document;
            document.Insert((string)Clipboard.GetData("Text"), new StyleDefinition());
            e.SuppressKeyPress = true;
            return false;
        }
        else
        {
            return base.ProcessKeyDownCore(e);
        }
    }
}

Open in new window


As seen here
http://www.telerik.com/forums/paste-as-plain-text-428893c5f4d8

Selvol
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.
Suggested Courses

765 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