views:

176

answers:

1

i have this:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<string>" %>


<script src="<%=Url.Content("~/Scripts/ckeditor/ckeditor.js")%>" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function() {
        var CurrName = $(".ckeditor").attr("name");
        CKEDITOR.replace(CurrName, { width: "800" });
});
</script>
<span>Description</span>
<%=Html.TextArea("",Model,10,40,new{Class="ckeditor"}) %>

the strange thing the editor shows up just fine, but for some reason there is still the origanl textbox on the page ??? so i now have 2 EmployeeDescription

anyone got a clue?

+1  A: 

Try replacing Class by @class:

<%= Html.TextArea("", Model, 10, 40, new { @class = "ckeditor" }) %>
Darin Dimitrov
that form of class actually works without the @ if its lowercase, what it turned out to be is i had changed label for to editfor instead of the textbox for so hence 2, am well overwork but gotta be done :-) will mark as answer though thanks
minus4