Hi Keerthana,
thank you for the support.
Unfortunately I forgot to specify that the dialog is located in an ascx.
I update the code so it will be easier to understand the problem.
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GestioneNews.ascx.cs" Inherits="PLVSite.Web20.UserControls.GestioneNews" %>
<script type="text/javascript">
Sys.Application.add_load(pageLoad);
function pageLoad(sender, args) {
if ($('[id$=hdf_ShowGestioneNews]').val() == "true")
$('#gestioneNewsModal').appendTo("form").modal({
backdrop: 'static',
keyboard: false,
show: true
});
var rteItaObj = $("#<%=rteDescrizioneNews.ClientID%>").data("ejRTE");
rteItaObj.refresh();
var rteEngObj = $("#<%=rteDescrizioneNewsIng.ClientID%>").data("ejRTE");
rteEngObj.refresh();
}
$.validator.setDefaults({
//to validate all fields(hidden also)
ignore: [],
//if we don’t set custom class, default “error” class will be added
errorClass: 'e-validation-error',
//it specifies the error message display position
errorPlacement: function (error, element) {
if (element.attr("id") == "<%=rteDescrizioneNews.ClientID%>" || element.attr("id") == "<%=rteDescrizioneNewsIng.ClientID%>") {
error.insertAfter(element.closest(".e-widget"));
}
else {
error.insertAfter(element);
}
}
});
$(window).on('load', function () {
var lang;
var co = Cookies.get("Site_Language");
if (co != null)
{
lang = co.substring(0, 2);
}
else
{
lang = "<%= Request.UserLanguages[0].Substring(0,2) %>";
}
if (lang != null && lang != "en") {
$.getScript("/Scripts/localization/messages_" + lang + ".js");
}
});
</script>
<asp:HiddenField runat="server" ID="hdf_ShowGestioneNews" />
<!-- Modal -->
<div class="modal" id="gestioneNewsModal" tabindex="-1" role="dialog" aria-labelledby="gestioneNewsModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title" id="gestioneNewsModalLabel"><span class="text-primary">
<asp:Literal ID="ltlTitolo" runat="server"></asp:Literal></span></h4>
</div>
<div class="modal-body ">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>
<asp:Literal ID="ltlTitoloNews" runat="server" Text="<%$ Resources:News,TitoloNews %>"></asp:Literal></label>
<input id="txtTitoloNews" type="text" runat="server" class="form-control" />
</div>
<div class="form-group">
<label>
<asp:Literal ID="ltlDescrizioneNews" runat="server" Text="<%$ Resources:News,DescrizioneNews %>"></asp:Literal></label>
<ej:rte id="rteDescrizioneNews" width="100%" isresponsive="true" runat="server" toolslist="font,alignment,style,lists,doAction,clipboard">
<Tools Font="fontName,fontSize,fontColor"
Alignment="justifyLeft,justifyCenter,justifyRight,justifyFull"
Styles="bold,italic,underline,strikethrough"
Lists="unorderedList,orderedList"
DoAction="undo,redo"
Clipboard="cut,copy,paste">
</Tools>
</ej:rte>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>
<asp:Literal ID="ltlTitoloNewsIng" runat="server" Text="<%$ Resources:News,TitoloNewsIng %>"></asp:Literal></label>
<input id="txtTitoloNewsIng" type="text" runat="server" class="form-control" />
</div>
<div class="form-group">
<label>
<asp:Literal ID="ltlDescrizioneNewsIng" runat="server" Text="<%$ Resources:News,DescrizioneNewsIng %>"></asp:Literal></label>
<ej:rte id="rteDescrizioneNewsIng" width="100%" isresponsive="true" runat="server" toolslist="font,alignment,style,lists,doAction,clipboard">
<Tools Font="fontName,fontSize,fontColor"
Alignment="justifyLeft,justifyCenter,justifyRight,justifyFull"
Styles="bold,italic,underline,strikethrough"
Lists="unorderedList,orderedList"
DoAction="undo,redo"
Clipboard="cut,copy,paste">
</Tools>
</ej:rte>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label>
<asp:Literal ID="ltlLink" runat="server" Text="<%$ Resources:News,Link %>"></asp:Literal></label>
<input id="txtLink" type="text" runat="server" class="form-control" />
</div>
</div>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="btnInvia" runat="server" Text="<%$ Resources:Application,btnInvia %>" CssClass="btn btn-primary" OnClick="btnInvia_Click" />
<asp:Button ID="btnCancella" runat="server" Text="<%$ Resources:Application,btnCancella %>" CssClass="btn btn-default" OnClick="btnCancella_Click" UseSubmitBehavior="false" />
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->