jquery - CSS and Js not loaded in controller action view -



jquery - CSS and Js not loaded in controller action view -

in mvc when move 1 controller action view through form post js , css files not loaded added in controller action view. first controller view used layout in sec 1 not in sec controller action view :

@{ layout = null; } <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <link type="text/css" rel="stylesheet" href="../../css/chatstyle.css" /> <link rel="stylesheet" href="../../css/jqueryui/themes/base/jquery.ui.all.css" /> <script src="../../scripts/jquery-1.8.2.js"></script> <script src="../../scripts/ui/jquery.ui.core.js"></script> <script src="../../scripts/ui/jquery.ui.widget.js"></script> <script src="../../scripts/ui/jquery.ui.mouse.js"></script> <script src="../../scripts/ui/jquery.ui.draggable.js"></script> <script src="../../scripts/ui/jquery.ui.resizable.js"></script> <script src="../../scripts/jquery.signalr-1.0.0.js"></script> <script src="/signalr/hubs"></script> <script type="text/javascript"> $(document).ready(function () { --------------large code related signalr---------------- }); </script> </head> <body> // content </body> </html>

if using direct sec controller action view through crtl + f5. working fine in advance

its working fine when using css , js part of view utilize after html content :

_chatlayout.cshtml

<!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <div id="main"> @renderbody() </div> <!-- /content --> </body> </html>

view :

@{ viewbag.title = "chat window"; layout = "~/views/shared/_chatlayout.cshtml"; } <div> // content </div> <link type="text/css" rel="stylesheet" href="../../css/chatstyle.css" /> <link rel="stylesheet" href="../../css/jqueryui/themes/base/jquery.ui.all.css" /> <script src="../../scripts/jquery-1.8.2.js"></script> <script src="../../scripts/ui/jquery.ui.core.js"></script> <script src="../../scripts/ui/jquery.ui.widget.js"></script> <script src="../../scripts/ui/jquery.ui.mouse.js"></script> <script src="../../scripts/ui/jquery.ui.draggable.js"></script> <script src="../../scripts/ui/jquery.ui.resizable.js"></script> <script src="../../scripts/jquery.signalr-1.0.0.js"></script> <script src="/signalr/hubs"></script> <script type="text/javascript"> $(document).ready(function () { -----large code related signalr------ }); </script>

jquery css asp.net-mvc asp.net-mvc-4

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -