permanent text in rad textbox

2 posts, 0 answers
  1. Baris
    Baris avatar
    34 posts
    Member since:
    Jul 2013

    Posted 15 Jan 2014 Link to this post


    I am using radtextbox in aspx page. I have a web service and it returns a string. I want to add these string to my textbox permanently. So when somebody click on my radtextbox they can't delete these string which already in textbox but they add characters on it. How can I do that?


  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Jan 2014 Link to this post

    Hi Baris,

    One suggestion is that you can use a span and on that set the permanent value of the RadTextBox and place it inside the RadTextBox. So it is not possible to delete the permanent text and can add more text to it. Please have a look into the following sample code snippet.

    <span id="Span1" runat="server"></span>
    <telerik:RadTextBox ID="RadTextBox1" runat="server" Style="z-index: -1;">

    protected void Page_Load(object sender, EventArgs e)
        //set the permanent data to the span
        Span1.InnerText = "Demo";

    <style type="text/css">
            position: absolute !important;
            left: 10px !important;

    <script type="text/javascript">
        function pageLoad() {
            var span = document.getElementById("Span1");
            var text = $find("<%=RadTextBox1.ClientID %>");
            for (var i = 0; i < 10; i++) {
                text._text += ' ';

Back to Top