Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7969027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:10:19+00:00 2026-06-04T07:10:19+00:00

I develop in ASP.NET MVC3, I have the code below to send the view

  • 0

I develop in ASP.NET MVC3, I have the code below to send the view which contains some javascript , and it will be loaded in a jQuery UI dialog on client side, but I don’t see the Javascript code anywhere in the client side,

View :

@model APS.HelpDesk.Data.App_TaskComment
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Ajax.BeginForm("AllAddComment", new { area = "Task" }, new AjaxOptions
{
    HttpMethod = "POST",
    InsertionMode = InsertionMode.Replace,
    LoadingElementId = "AddCommnetloadingGif",
    UpdateTargetId = "AllCommentList" + Model.TaskId,
    OnSuccess = " $('#AddCommentDialog').dialog('close');"
}))
{
    @Html.ValidationSummary(true)
    @Html.HiddenFor(model => model.TaskId)
    <input type="hidden" value="@Model.TaskId" id="TaskId" />
    <div class="editor-label">
        @Html.Label("کامنت جديد")
    </div>
    <div class="editor-field">
        <textarea id="CommentText" rows="2" name="CommentText" data-val-required="نوشتن کامنت ضروری است"
            data-val="true" cols="20"></textarea>
        <br />
        @Html.ValidationMessageFor(model => model.CommentText)
    </div>
    <p>
        <input type="submit" value="ارسال" />
    </p>
    <div id="AddCommnetloadingGif" style="display: none">
        <img src="@Url.Content("~/Content/Images/ajax-loader/1.gif")" />
    </div>
}
<script type="text/javascript">
    $(document).ready(function () {
        bkLib.onDomLoaded(function () {
            new nicEditor({ iconsPath: '@Url.Content("~/Content/WYSIWYG/nicEditorIcons.gif")' }).panelInstance('CommentText');
        });
    });
</script>

Dialog’s code fromFirebug

<div style="outline: 0px; height: auto; width: 500px; position: absolute; top: 385px; left: 379px; display: block; z-index: 1002; " class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable ui-resizable" tabindex="-1" role="dialog" aria-labelledby="ui-dialog-title-AddCommentDialog"><div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix"><span class="ui-dialog-title" id="ui-dialog-title-AddCommentDialog">ايجاد کامنت جديد</span><a href="#" class="ui-dialog-titlebar-close ui-corner-all" role="button"><span class="ui-icon ui-icon-closethick">close</span></a></div><div id="AddCommentDialog" style="text-align: right; width: auto; min-height: 108px; height: auto; " class="ui-dialog-content ui-widget-content">

<form action="/Task/Task/AllAddComment" data-ajax="true" data-ajax-loading="#AddCommnetloadingGif" data-ajax-method="POST" data-ajax-mode="replace" data-ajax-success=" $('#AddCommentDialog').dialog('close');" data-ajax-update="#AllCommentList15" id="form0" method="post"><input data-val="true" data-val-number="The field TaskId must be a number." data-val-required="The TaskId field is required." id="TaskId" name="TaskId" type="hidden" value="15">    <input type="hidden" value="15" id="TaskId">
    <div class="editor-label">
        <label for="">کامنت جديد</label>
    </div>
    <div class="editor-field">
        <textarea id="CommentText" rows="2" name="CommentText" data-val-required="نوشتن کامنت ضروری است" data-val="true" cols="20"></textarea>
        <br>
        <span class="field-validation-valid" data-valmsg-for="CommentText" data-valmsg-replace="true"></span>
    </div>
    <p>
        <input type="submit" value="ارسال">
    </p>
    <div id="AddCommnetloadingGif" style="display: none">
        <img src="/Content/Images/ajax-loader/1.gif">
    </div>
</form>
</div><div class="ui-resizable-handle ui-resizable-n" style=""></div><div class="ui-resizable-handle ui-resizable-e" style=""></div><div class="ui-resizable-handle ui-resizable-s" style=""></div><div class="ui-resizable-handle ui-resizable-w" style=""></div><div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se ui-icon-grip-diagonal-se" style="z-index: 1001; "></div><div class="ui-resizable-handle ui-resizable-sw" style="z-index: 1002; "></div><div class="ui-resizable-handle ui-resizable-ne" style="z-index: 1003; "></div><div class="ui-resizable-handle ui-resizable-nw" style="z-index: 1004; "></div></div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:10:20+00:00Added an answer on June 4, 2026 at 7:10 am

    Weird, I can see it and also the script works (put an alert):

    enter image description here

    And here’s my test code (simplified of course to remove all the noise):

    Model:

    public class App_TaskComment
    {
        public int TaskId { get; set; }
        public string CommentText { get; set; }
    }
    

    Controller:

    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }
    
        public ActionResult Dialog()
        {
            var model = new App_TaskComment();
            return PartialView("_dialog", model);
        }
    }
    

    Main view (~/Views/Home/Index.cshtml):

    <script type="text/javascript">
        $(function () {
            var url = '@Url.Action("dialog")';
            $('<div id="dialog">Loading...</div>').appendTo('body').dialog({
                modal: true
            }).load(url, { });
        });
    </script>
    
    <div id="AddCommentDialog"></div>
    

    Dialog partial loaded with AJAX (~/Views/Home/_Dialog.cshtml):

    @model App_TaskComment
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    @using (Ajax.BeginForm("AllAddComment", new { area = "Task" }, new AjaxOptions
    {
        HttpMethod = "POST",
        InsertionMode = InsertionMode.Replace,
        LoadingElementId = "AddCommnetloadingGif",
        UpdateTargetId = "AllCommentList" + Model.TaskId,
        OnSuccess = "$('#AddCommentDialog').dialog('close');"
    }))
    {
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.TaskId)
        <input type="hidden" value="@Model.TaskId" id="TaskId" />
        <div class="editor-label">
            @Html.Label("کامنت جديد")
        </div>
        <div class="editor-field">
            <textarea id="CommentText" rows="2" name="CommentText" data-val-required="نوشتن کامنت ضروری است"
                data-val="true" cols="20"></textarea>
            <br />
            @Html.ValidationMessageFor(model => model.CommentText)
        </div>
        <p>
            <input type="submit" value="ارسال" />
        </p>
        <div id="AddCommnetloadingGif" style="display: none">
            <img src="@Url.Content("~/Content/Images/ajax-loader/1.gif")" />
        </div>
    }
    <script type="text/javascript">
        $(document).ready(function () {
            bkLib.onDomLoaded(function () {
                new nicEditor({ iconsPath: '@Url.Content("~/Content/WYSIWYG/nicEditorIcons.gif")' }).panelInstance('CommentText');
            });
        });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i develop a asp.net mvc3 shop application which is multi tenant. Each customer (around
I use VS2010,C# to develop ASP.NET web app, I have some two text boxes,
I'm using VS2010,C# to develop my ASP.NET web app. I have some a combo
I have develop small Asp.net MVC3 application using Telerik rad Controls with in that
i have develop a small mvc3 application using Telerik Extension for asp.net mvc3 in
I want to develop an ASP.NET application which will retreive the HOSTUUID from the
I have been develop API using asp.net with C# back-end code. i would like
I have to develop an ASP.NET MVC3 application in C# and Razor that has
I use VS2010, C# to develop ASP.NET web app, I create some sessions in
I have to develop an appliction (Asp.Net - maybe MVC) that would be integrated

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.