locked
Failed to load resource: net::ERR_CONNECTION_REFUSED RRS feed

  • Question

  • User81789783 posted

    for above mentioned error i m facing in vs 2013 +mvc 5, i did below but no  resolution so far

    1. Right-click chrome
    2. Go to 'inspect element'
    3. Look for the 'network' tab somewhere at the top. Click it.
    4. Check the 'disable cache' checkbox.

    Here is the code

    @model CallCenterCRM.Models.ViewModel.EmployeeMainModel
    <script type="text/javascript">
        $("#datepicker").datepicker({
            changeMonth: true,
            changeYear: true
        });
    </script> 
    <script>
        var Address = [];
        var Phone = [];
    
        function AddAddress() {
    
            var address = document.getElementById("AddressType");
            var selectedText = address.options[address.selectedIndex].text;
    
            if (selectedText == "..Select..")
            {
    
                alert("Can not add")
                return;
            }
    
    
            var obj = {
                'data': selectedText,
    
            }
    
            if (Address.length <= 2) {
                //check if already exist"
                for (i = 0; i < Address.length; i++) {
                    if(Address[i] == selectedText)
                    {
                        alert("Already added")
                        return;
                    }
                }
                var phonebtn = document.getElementById("btn_phone");
                btn_phone.disabled = false;
                Address.push(obj.data);
                alert("the item is " + Address.length)
                //  alert(student.length)
            }
            else {
                alert("All possible type address addded")
                for (i = 0; i < Address.length; i++)
                    alert(Address[i]);
    
    
            }
    
    
    
        }
    
        function AddPhone()
        {
            var phone = document.getElementById("PhoneType");
            var selectedText = phone.options[phone.selectedIndex].text;
         //   alert("phoen here")
            if (selectedText == "..Select..") {
    
                alert("Can not add")
                return;
            }
    
    
            var obj = {
                'data': selectedText,
    
            }
    
            if (Phone.length <= 2) {
                //check if already exist"
                for (i = 0; i < Phone.length; i++) {
                    if (Phone[i] == selectedText) {
                        alert("Already added")
                        return;
                    }
                }
                var phonebtn = document.getElementById("btn_phone");
                btn_phone.disabled = false;
                Phone.push(obj.data);
                alert("the item is " + Phone.length)
                //  alert(student.length)
            }
            else {
                alert("All possible type Phone addded")
                for (i = 0; i < Phone.length; i++)
                    alert(Phone[i]);
    
    
            }
    
        }
    
    
    </script>
    @using (Html.BeginForm("Create", "EmpMaster", "FormMethod.Post"))
    {
        @Html.AntiForgeryToken()
        
        <div class="form-horizontal">
            <h4>EmployeeMainModel</h4>
            <hr />
            @Html.ValidationSummary(true, "", new { @class = "text-danger" })
            <div>
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_FirstName, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_FirstName, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_FirstName, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_MiddleName, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_MiddleName, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_MiddleName, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_LastName, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_LastName, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_LastName, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_Gender, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.DropDownList("Gender", new List<SelectListItem>
            {
            	new SelectListItem{ Text="Male", Value="Male"},
            	new SelectListItem{ Text="Female", Value="Female"}
    		}, "--- Select ---", new { @class = "form-control" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_MartialStatus, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.DropDownList("Martialstatus", new List<SelectListItem>
            {
            	new SelectListItem{ Text="Single", Value="Single"},
            	new SelectListItem{ Text="Married", Value="Married"}
    		}, "--- Select ---", new { @class = "form-control" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_DOB, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_DOB, new { id = "datepicker", htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_DOB, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_DOJ, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_DOJ, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_DOJ, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_HighestQualification, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_HighestQualification, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_HighestQualification, "", new { @class = "text-danger" })
                    </div>
                </div>
            </div>
            <div>
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_DeptId, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_DeptId, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_DeptId, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.SelectedDesignation, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-5">
                        @Html.DropDownListFor(model => Model.SelectedDesignation, new SelectList(Model.Designations, "Value", "Text"), "..Select..", htmlAttributes: new { @class = "form-control", id = "Designation" })
                        @Html.ValidationMessageFor(model => Model.SelectedDesignation, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => Model.SelectedDepartment, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-5">
                        @Html.DropDownListFor(model => Model.SelectedDepartment, new SelectList(Model.Departments, "Value", "Text"), "..Select..", htmlAttributes: new { @class = "form-control", id = "Department" })
                        @Html.ValidationMessageFor(model => Model.SelectedDepartment, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_Gender, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_Gender, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_Gender, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_MartialStatus, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_MartialStatus, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_MartialStatus, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_photoFilename, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_photoFilename, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_photoFilename, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_ID, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_ID, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_ID, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.DoorNo, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.DoorNo, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.DoorNo, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Street, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Street, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Street, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.City, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.City, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.City, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.State, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.State, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.State, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.pincode, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.pincode, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.pincode, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Country, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Country, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Country, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Addresstype, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Addresstype, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Addresstype, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.SelectedAddressType, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.SelectedAddressType, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.SelectedAddressType, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Phonetype, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Phonetype, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Phonetype, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.SelectedPhoneType, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.SelectedPhoneType, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.SelectedPhoneType, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.PhoneNo, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.PhoneNo, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.PhoneNo, "", new { @class = "text-danger" })
                    </div>
                </div>
            </div>
            <div>
                @*<div class="form-group">
                    @Html.LabelFor(model => model.Emp_Login, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_Login, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_Login, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_Password, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_Password, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_Password, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_SecQuestion, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_SecQuestion, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_SecQuestion, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_SecAnswer, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_SecAnswer, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_SecAnswer, "", new { @class = "text-danger" })
                    </div>
                </div>
    
                <div class="form-group">
                    @Html.LabelFor(model => model.Emp_Role, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Emp_Role, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Emp_Role, "", new { @class = "text-danger" })
                    </div>
                </div>*@
    
                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <input type="submit" value="Create" class="btn btn-default" />
                    </div>
                </div>
            </div>
        </div>
    }
    
    <div>
        @Html.ActionLink("Back to List", "Index")
    </div>
    
    @section Scripts {
        @Scripts.Render("~/bundles/jqueryval")
    }
    
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>@ViewBag.Title - My ASP.NET Application</title>
    
        @Styles.Render("~/Content/css")
        @Styles.Render("~/Content/themes/base/css")
       
        @Scripts.Render("~/bundles/modernizr")
        @Scripts.Render("~/bundles/jquery")
        @Scripts.Render("~/bundles/jqueryval")
        @Scripts.Render("~/bundles/jqueryui")
        
        @Scripts.Render("~/bundles/bootstrap")
    
      
    
        <link href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css" rel="stylesheet" />
        <link href="https://cdn.datatables.net/buttons/1.5.1/css/buttons.dataTables.min.css" rel="stylesheet" />
    
        <script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
    
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
          
        @*//code.jquery.com/jquery-1.12.4.js*@
        <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
    
        @*<script src="https://cdn.datatables.net/buttons/1.5.1/js/dataTables.buttons.min.js"></script>*@
    
    
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script>
    
        @*<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.0.1/js/buttons.colvis.min.js"></script>*@
    
    
    
        <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
        @*<script src=" https://cdn.datatables.net/buttons/1.5.1/js/buttons.html5.min.js"></script>*@
    
        <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
    
        <script src="~/Scripts/jquery-1.12.4.js"></script>
    
        <script src="~/Scripts/jquery-ui.js"></script>
    
    
    
    </head>
    <body>
        <div class="navbar navbar-inverse navbar-fixed-top">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    @Html.ActionLink("Application name", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
                </div>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li>@Html.ActionLink("Home", "Index", "Home")</li>
                        <li>@Html.ActionLink("About", "About", "Home")</li>
                        <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
                    </ul>
                    @*@Html.Partial("_LoginPartial")*@
                </div>
            </div>
        </div>
        <div class="container body-content">
            @RenderBody()
            <hr />
            <footer>
                <p>&copy; @DateTime.Now.Year - My ASP.NET Application</p>
            </footer>
        </div>
        @RenderSection("scripts", required: false)
    </body>
    </html>

    Saturday, February 10, 2018 5:01 AM

Answers

All replies