Link to home
Start Free TrialLog in
Avatar of Saroj13
Saroj13

asked on

How to make the AjaxControlToolkit HTmlEditorExtendor ReadOnly asp.net and C#?

<script language="javascript" type="text/javascript">
                $(window).bind("load", function () {
              document.getElementById('gvFeedback$ctl02$txtDetails').ReadOnly = true;
          });
        
    </script>
    <style type="text/css">
    .ajax__html_editor_extender_buttoncontainer
    {
          display:none;
          
          
          }
          
          .containerClass .ajax__html_editor_extender_container
        {
            width: 100% !important;/*important is really important at here*/
        }

    </style>


  <asp:TextBox runat="server" ID="txtDetails"  TextMode="MultiLine" CssClass="TextBoxEditor"  Text='FeedDetails'   Width="100%" Height="110px"/><br />            
                                      <ajaxToolkit:HtmlEditorExtender ID="htmlEditorExtendertxtDetails"   EnableSanitization="false" DisplaySourceTab="false"
                                      TargetControlID="txtDetails"  runat="server" > </ajaxToolkit:HtmlEditorExtender>
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you could also, hide the editor and show a div with the editor content. so that user can only see it, can't edit it.  later you can show the editor base on some condition.