Click here to Skip to main content
16,016,535 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
HTML
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>@ViewBag.Title</title>

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

    <!-- Bootstrap -->
    <link href="~/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="~/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- NProgress -->
    <link href="~/nprogress/nprogress.css" rel="stylesheet">

    <!-- Custom Theme Style -->
    <link href="~/build/css/custom.min.css" rel="stylesheet">

</head>

<body class="nav-md">
    <div class="container body">
        <div class="main_container">
            <div class="col-md-3 left_col">
                <div class="left_col scroll-view">
                    <div class="navbar nav_title" style="border: 0;">
                        <a href="index.html" class="site_title"><span class="fa fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a>^__i class="fa fa-home"__^</i__^Home <span class="fa fa-chevron-down"></span></a>
                                            <ul class="nav child_menu">
                                            </ul>
                                        </li>
                                        <li><a>^__i class="fa fa-home"__^Company <span class="fa fa-chevron-down"></span></a>
                                            <ul class="nav child_menu">
                                                @*<li><a href="~/Views/Home/Index.cshtml">Employee</a></li>*@
                                                @*@Html.ActionLink("Employee", "Index","Home")*@
                                                @*<li>@Html.ActionLink("Employee", "Index", "Home")</li>*@
                                                <li>@Html.ActionLink("Work Division", "WorkDivision", "WorkDivision")</li>
                                                <li>@Html.ActionLink("Store", "StoreUnit", "StoreUnit")</li>
                                                <li>@Html.ActionLink("Store Section", "StoreSection", "StoreSection")</li>
                                                <li>@Html.ActionLink("Department", "DepartmentIndex", "Department")</li>
                                            </ul>
                                        </li>
                                        <li><a>^__i class="fa fa-home"__^Interactors <span class="fa fa-chevron-down"></span></a>
                                            <ul class="nav child_menu">
                                                <li>@Html.ActionLink("Agent", "Index", "Agent")</li>
                                                <li>@Html.ActionLink("Buyer", "BuyerIndex", "Buyer")</li>
                                                <li>@Html.ActionLink("Consignee", "ConsigneeIndex", "Consignee")</li>
                                                <li>@Html.ActionLink("Supplier", "SupplierIndex", "Supplier")</li>
                                                <li>@Html.ActionLink("Courier", "CourierIndex", "Courier")</li>
                                                <li>@Html.ActionLink("Bank", "BankIndex", "Bank")</li>
                                            </ul>
                                        </li>
                                        <li><a>^__i class="fa fa-home"__^Item <span class="fa fa-chevron-down"></span></a>
                                            <ul class="nav child_menu">
                                                <li>@Html.ActionLink("Item Group", "ItemGroupIndex", "ItemGroup")</li>
                                                <li>@Html.ActionLink("Item", "ItemIndex", "Item")</li>
                                                <li>@Html.ActionLink("Color Group", "ColorGroupIndex", "ColorGroup")</li>
                                                <li>@Html.ActionLink("Color", "ColorIndex", "Color")</li>
                                                <li>@Html.ActionLink("Color Code", "ColorCodeIndex", "ColorCode")</li>
                                                <li>@Html.ActionLink("Size", "SizeIndex", "Size")</li>
                                            </ul>
                                        </li>
                                    </ul>
                                </li>
                                <li><a>^__i class="fa fa-edit"__^Forms <span class="fa fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="form.html">General Form</a></li>
                                        <li><a href="form_advanced.html">Advanced Components</a></li>
                                        <li><a href="form_validation.html">Form Validation</a></li>
                                        <li><a href="form_wizards.html">Form Wizard</a></li>
                                        <li><a href="form_upload.html">Form Upload</a></li>
                                        <li><a href="form_buttons.html">Form Buttons</a></li>
                                    </ul>
                                </li>
                                <li><a>^__i class="fa fa-desktop"__^UI Elements <span class="fa fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="general_elements.html">General Elements</a></li>
                                        <li><a href="media_gallery.html">Media Gallery</a></li>
                                        <li><a href="typography.html">Typography</a></li>
                                        <li><a href="icons.html">Icons</a></li>
                                        <li><a href="glyphicons.html">Glyphicons</a></li>
                                        <li><a href="widgets.html">Widgets</a></li>
                                        <li><a href="invoice.html">Invoice</a></li>
                                        <li><a href="inbox.html">Inbox</a></li>
                                        <li><a href="calendar.html">Calendar</a></li>
                                    </ul>
                                </li>
                                <li><a>^__i class="fa fa-table"__^Tables <span class="fa fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="tables.html">Tables</a></li>
                                        <li><a href="tables_dynamic.html">Table Dynamic</a></li>
                                    </ul>
                                </li>
                                <li><a>^__i class="fa fa-bar-chart-o"__^Data Presentation <span class="fa fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="chartjs.html">Chart JS</a></li>
                                        <li><a href="chartjs2.html">Chart JS2</a></li>
                                        <li><a href="morisjs.html">Moris JS</a></li>
                                        <li><a href="echarts.html">ECharts</a></li>
                                        <li><a href="other_charts.html">Other Charts</a></li>
                                    </ul>
                                </li>
                                <li><a>^__i class="fa fa-clone"__^Layouts <span class="fa fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="fixed_sidebar.html">Fixed Sidebar</a></li>
                                        <li><a href="fixed_footer.html">Fixed Footer</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </div>
                        <div class="menu_section">
                            <h3>Live On</h3>
                            <ul class="nav side-menu">
                                <li><a>^__i class="fa fa-bug"__^Additional Pages <span class="fa fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="e_commerce.html">E-commerce</a></li>
                                        <li><a href="projects.html">Projects</a></li>
                                        <li><a href="project_detail.html">Project Detail</a></li>
                                        <li><a href="contacts.html">Contacts</a></li>
                                        <li><a href="profile.html">Profile</a></li>
                                    </ul>
                                </li>
                                <li><a>^__i class="fa fa-windows">Extras <span class="fa fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="page_403.html">403 Error</a></li>
                                        <li><a href="page_404.html">404 Error</a></li>
                                        <li><a href="page_500.html">500 Error</a></li>
                                        <li><a href="plain_page.html">Plain Page</a></li>
                                        <li><a href="login.html">Login Page</a></li>
                                        <li><a href="pricing_tables.html">Pricing Tables</a></li>
                                    </ul>
                                </li>
                                <li><a>^__i class="fa fa-sitemap">Multilevel Menu <span class="fa fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="#level1_1">Level One</a>
                                        <li><a>Level One<span class="fa fa-chevron-down"></span></a>
                                            <ul class="nav child_menu">
                                                <li class="sub_menu"><a href="level2.html">Level Two</a>
                                                </li>
                                                <li><a href="#level2_1">Level Two</a>
                                                </li>
                                                <li><a href="#level2_2">Level Two</a>
                                                </li>
                                            </ul>
                                        </li>
                                        <li><a href="#level1_2">Level One</a>
                                        </li>
                                    </ul>
                                </li>
                                <li><a href="javascript:void(0)">^__i class="fa fa-laptop">Landing Page <span class="label label-success pull-right">Coming Soon</span></a></li>
                            </ul>
                        </div>

                    </div>
                    <!-- /sidebar menu -->

                    <!-- /menu footer buttons -->
                    <div class="sidebar-footer hidden-small">
                        <a data-toggle="tooltip" data-placement="top" title="Settings">
                            <span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
                        </a>
                        <a data-toggle="tooltip" data-placement="top" title="FullScreen">
                            <span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
                        </a>
                        <a data-toggle="tooltip" data-placement="top" title="Lock">
                            <span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
                        </a>
                        <a data-toggle="tooltip" data-placement="top" title="Logout" href="login.html">
                            <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
                        </a>
                    </div>
                    <!-- /menu footer buttons -->
                </div>
            </div>

            <!-- top navigation -->
            <div class="top_nav">
                <div class="nav_menu">
                    <nav>
                        <div class="nav toggle">
                            <a id="menu_toggle">^__i class="fa fa-bars"></a>
                        </div>
                    </nav>
                </div>
            </div>
            <!-- /top navigation -->

            <div>
                @RenderBody()
            </div>

            <!-- footer content -->
            <footer>
                <div class="pull-right">
                    Axon Infosoft India pvt lmt | <a href="http://www.axonindia.com">Website </a>
                </div>
                <div class="clearfix"></div>
            </footer>
            <!-- /footer content -->
        </div>
    </div>

    <!-- jQuery -->
    <script src="~/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap -->
    <script src="~/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="~/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="~/nprogress/nprogress.js"></script>

    <!-- Custom Theme Scripts -->
    <script src="~/build/js/custom.min.js"></script>
    
    @RenderSection("scripts", required: false)


</body>
</html>


What I have tried:

HTML
<pre>@model AxonApparels.Models.Supplier
@{
    ViewBag.Title = "Supplier";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<script src="~/AxonScripts/Supplier.js"></script>

<link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/ui-darkness/jquery-ui.min.css" rel="stylesheet">
	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
	<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>

<!-- page content -->
<div class="right_col" role="main">
    <div class="container">

        <div class="clearfix"></div>

        <div class="row">
            <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                    <div class="x_title">
                        <h2>Supplier</h2>
                        <ul class="nav navbar-right panel_toolbox">
                            <li><a class="collapse-link"></a>
                            </li>
                            
                            <li><a class="close-link">^__i class="fa fa-close"></a>
                            </li>
                        </ul>
                        <div class="clearfix"></div>
                    </div>
                    <div class="x_content">
                        <div class="container">
                            @*<h2>Departments Record</h2>*@
                            <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal" onclick="clearTextBox();">Add New Supplier</button><br />
                            <br />
                            <table class="table table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <th style="visibility: hidden;">ID
                                        </th>
                                        <th>Supplier Name
                                        </th>
                                        <th>Address
                                        </th>
                                        <th>City
                                        </th>
                                        <th>Status
                                        </th>
                                        <th>Action
                                        </th>
                                    </tr>
                                </thead>
                                <tbody class="tbody">
                                </tbody>
                            </table>
                        </div>
                        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        @*
                    <button type="button" class="close" data-dissmiss="modal"><span aria-hidden="true">×</span></button>*@
                                        <button type="button" class="close" data-dismiss="modal">×</button>
                                        <h4 class="modal-title" id="myModalLabel">Add Supplier</h4>
                                    </div>
                                    <div class="modal-body">
                                        <form>
                                            <div class="form-group">
                                                <label for="SupplierID">ID</label>
                                                <input type="text" class="form-control" id="SupplierID" placeholder="Id" disabled="disabled" />
                                            </div>
                                            <div class="form-group">
                                                <table>
                                                    <tr>
                                                        <td colspan="2">
                                                            <label for="Name">Supplier Name</label>
                                                            <input type="text" class="form-control" id="Name" placeholder="Name" />
                                                        </td>
                                                        <td colspan="2">
                                                            <label for="lookup">Look up</label>
                                                            <input type="text" class="form-control" id="lookup" placeholder="Look up" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <label for="add1">Address1</label>
                                                            <input type="text" class="form-control" id="add1" placeholder="Address1" />
                                                        </td>
                                                        <td colspan="2">
                                                            <label for="add2">Address2</label>
                                                            <input type="text" class="form-control" id="add2" placeholder="Address2" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <label for="add3">Address3</label>
                                                            <input type="text" class="form-control" id="add3" placeholder="Address3" />
                                                        </td>
                                                        <td colspan="2">
                                                            <label for="city">City</label>
                                                            @Html.DropDownListFor(m => m.CityList, Model.CityList, "--Select City--", new { @id = "ddlcity", @class = "form-control" })
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <label for="zipcode">Zipcode</label>
                                                            <input type="text" class="form-control" id="zipcode" placeholder="Zipcode" />
                                                        </td>
                                                        <td colspan="2">
                                                            <label for="Status">Status</label>
                                                            <input type="checkbox" class="form-control" id="Status" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <label for="email">Email</label>
                                                            <input type="text" class="form-control" id="email" placeholder="EMail" />
                                                        </td>
                                                        <td colspan="2">
                                                            <label for="phoneno">Phone No</label>
                                                            <input type="text" class="form-control" id="phoneno" placeholder="Phone No" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <label for="fax">Fax</label>
                                                            <input type="text" class="form-control" id="fax" placeholder="Fax" />
                                                        </td>
                                                        <td colspan="2">
                                                            <label for="telex">Telex</label>
                                                            <input type="text" class="form-control" id="telex" placeholder="Telex" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <label for="cstno">CST No</label>
                                                            <input type="text" class="form-control" id="cstno" placeholder="CST No" />
                                                        </td>

                                                        <td colspan="2">
                                                            <div>
                                                                <label for="cstdate">CST Date</label>
                                                            </div>
                                                            <div>
                                                                <input class="form-control" id="cstdate" type="text">                                                                
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    
                                                    <tr>
                                                        
                                                        <td colspan="2">
                                                            <label for="tinno">Tin No</label>
                                                            <input type="text" class="form-control" id="tinno" placeholder="Tin No" />
                                                        </td>
                                                        <td colspan="2">
                                                            <div>
                                                                <label for="tindate">Tin Date</label>
                                                            </div>
                                                            <div>
                                                                <input class="form-control" id="tindate" type="text">                                                                
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <label for="contactname">Contact Name</label>
                                                            <input type="text" class="form-control" id="contactname" placeholder="Contact Name" />
                                                        </td>
                                                        <td colspan="2">
                                                            <label for="panno">Pan No</label>
                                                            <input type="text" class="form-control" id="panno" placeholder="Pan No" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <label for="mobno">Mob No</label>
                                                            <input type="text" class="form-control" id="mobno" placeholder="Pan No" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </form>
                                        <form>
                                        </form>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-primary" id="btnAdd" onclick="return Add();">Add</button>
                                        <button type="button" class="btn btn-primary" id="btnUpdate" style="display: none;" onclick="Update();">Update</button>
                                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

@*@System.Web.Optimization.Scripts.Render("~/bundles/jqueryval")*@
<script type="text/javascript">
    $(document).ready(function () {
        $("#tindate").datepicker({ format: 'dd-mm-yyyy' });
        $("#cstdate").datepicker({ format: 'dd-mm-yyyy' });
    });
        
    
</script>
<!-- /page content -->
Posted
Updated 20-Jul-17 3:15am
v3

1 solution

Your href and src URL's look wrong to me. You have the following:
<link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/ui-darkness/jquery-ui.min.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>
But these should be:
<link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/ui-darkness/jquery-ui.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>

Also, you have two different versions of Jquery referenced - 1.9.1 in the layout page, and 1.10.2 in the child view. I'd suggest keeping the script references in the layout page.

Reference: Hosted Libraries  |  Hosted Libraries  |  Google Developers[^]
 
Share this answer
 
v2
Comments
F-ES Sitecore 20-Jul-17 9:33am    
src="//..." is valid, it is a way of giving a protocol agnostic link, so if the page is http it will download http://ajax.googleapis/... however if the page is https it will download https://ajax.googleapis/...

I agree about the double reference though, he should only have the jQuery reference in the layout and there should only be one.
[no name] 20-Jul-17 9:40am    
Well you learn something new every day! Personally I think it's bad practice and won't be using it myself..

https://www.paulirish.com/2010/the-protocol-relative-url/

"Now that SSL is encouraged for everyone and doesn’t have performance concerns, this technique is now an anti-pattern. If the asset you need is available on SSL, then always use the https:// asset. Allowing the snippet to request over HTTP opens the door for attacks like the recent Github Man-on-the-side attack. It’s always safe to request HTTPS assets even if your site is on HTTP, however the reverse is not true."
peer mohammed.A 31-Aug-17 1:22am    
i have changed all things based on your suggesstion, even though DatePicker not viewed..please check with my below code
peer mohammed.A 31-Aug-17 1:23am    
<!DOCTYPE html>


<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>@ViewBag.Title






<!-- Bootstrap -->

<!-- Font Awesome -->

<!-- NProgress -->


<!-- Custom Theme Style -->












Axon Infosoft




<!-- menu profile quick info -->
@*




Welcome,

John Doe




*@
<!-- /menu profile quick info -->



<!-- sidebar menu -->


@*

General

*@

Master

Home



Company

@*Employee*@
@*@Html.ActionLink("Employee", "Index","Home")*@
@Html.ActionLink("Company Unit", "CompanyUnitIndex", "CompanyUnit")
@Html.ActionLink("Work Division", "WorkDivision", "WorkDivision")
@Html.ActionLink("Store", "StoreUnit", "StoreUnit")
@Html.ActionLink("Store Section", "StoreSection", "StoreSection")
@Html.ActionLink("Department", "DepartmentIndex", "Department")


Interactors

@Html.ActionLink("Agent", "Index", "Agent")
@Html.ActionLink("Buyer", "BuyerIndex", "Buyer")
@Html.ActionLink("Consignee", "ConsigneeIndex", "Consignee")
@Html.ActionLink("Supplier", "SupplierIndex", "Supplier")
@Html.ActionLink("Courier", "CourierIndex", "Courier")
@Html.ActionLink("Bank", "BankIndex", "Bank")


Item

@Html.ActionLink("Item Group", "ItemGroupIndex", "

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900