{"id":649,"date":"2016-01-13T10:22:54","date_gmt":"2016-01-13T04:52:54","guid":{"rendered":"http:\/\/stepbystepschools.net\/?p=649"},"modified":"2016-01-13T10:22:54","modified_gmt":"2016-01-13T04:52:54","slug":"asp-net-mvc-and-angular-training-in-mumbai-razor-and-javascript","status":"publish","type":"post","link":"https:\/\/www.stepbystepschools.net\/?p=649","title":{"rendered":"ASP.NET MVC and Angular Training in Mumbai :- @Razor and JavaScript"},"content":{"rendered":"<p>Again a big thanks to our students to make our MVC training in Mumbai Andheri successful. It was small batch of 4 people and this time we had some people travelling from Pune as well.<\/p>\n<p>One of the interesting learning that happened in this MVC training was razor symbol and javascript clash.<\/p>\n<p>We had a very simple javascript code which was running inside razor engine and we wanted to set a twitter id to the javascript variable. But because the twitter id had a \u201c@\u201d symbol razor was throwing exception.<\/p>\n<p><a href=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2016\/01\/1.jpg\"><img loading=\"lazy\" class=\" wp-image-651 aligncenter\" src=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2016\/01\/1-300x63.jpg\" alt=\"1\" width=\"401\" height=\"84\" srcset=\"https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2016\/01\/1-300x63.jpg 300w, https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2016\/01\/1.jpg 476w\" sizes=\"(max-width: 401px) 100vw, 401px\" \/><\/a><\/p>\n<p>In case you are thinking that with two \u201c@@\u201d it should work and then let me confirm it will not.We wanted to display in the javascript alert only one \u2018@\u2019 so this was not the solution for it.<\/p>\n<p><a href=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2016\/01\/2.jpg\"><img loading=\"lazy\" class=\" wp-image-652 aligncenter\" src=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2016\/01\/2-300x57.jpg\" alt=\"2\" width=\"426\" height=\"81\" srcset=\"https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2016\/01\/2-300x57.jpg 300w, https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2016\/01\/2.jpg 515w\" sizes=\"(max-width: 426px) 100vw, 426px\" \/><\/a><\/p>\n<p>This was solved by using \u201cHtml\u201d helper. So from the server side we will tell HTML helper to parse the \u201c@\u201d and set send it as javascript code to the browser. This worked a like a charm. We understand its not a great solution but it solved our problem.<\/p>\n<pre>var twitter = @Html.Raw(\"'@shivkoirala'\");\r\nalert(twitter);\r\n<\/pre>\n<p>Thanks to our participants to attend this MVC training our next MVC training will start this coming Saturday and Sunday. Do not miss our 16 hours of action in our Mumbai Andheri training institute. For syllabus and venue you can see this link <a href=\"http:\/\/stepbystepschools.net\/?page_id=315\">www.stepbystepschools.net\/?page_id=315<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Again a big thanks to our students to make our MVC training in Mumbai Andheri successful. It was small batch of 4 people and this time we had some people travelling from Pune as well. One of the interesting learning &hellip; <a href=\"https:\/\/www.stepbystepschools.net\/?p=649\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[49,1,3],"tags":[60,59,34],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>ASP.NET MVC and Angular Training in Mumbai :- @Razor and JavaScript - Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.stepbystepschools.net\/?p=649\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ASP.NET MVC and Angular Training in Mumbai :- @Razor and JavaScript - Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai\" \/>\n<meta property=\"og:description\" content=\"Again a big thanks to our students to make our MVC training in Mumbai Andheri successful. It was small batch of 4 people and this time we had some people travelling from Pune as well. One of the interesting learning &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.stepbystepschools.net\/?p=649\" \/>\n<meta property=\"og:site_name\" content=\"Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-13T04:52:54+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2016\/01\/1-300x63.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sukesh Marla\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.stepbystepschools.net\/#website\",\"url\":\"https:\/\/www.stepbystepschools.net\/\",\"name\":\"Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai\",\"description\":\"MVC 5\/Core, AngularJS 1.x, 2.0, 4.0, Design Pattern, Architecture, SSIS, SSAS, SSRS, Data Science, Big data, Hadoop classroom training\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.stepbystepschools.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.stepbystepschools.net\/?p=649#primaryimage\",\"url\":\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2016\/01\/1-300x63.jpg\",\"contentUrl\":\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2016\/01\/1-300x63.jpg\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.stepbystepschools.net\/?p=649#webpage\",\"url\":\"https:\/\/www.stepbystepschools.net\/?p=649\",\"name\":\"ASP.NET MVC and Angular Training in Mumbai :- @Razor and JavaScript - Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai\",\"isPartOf\":{\"@id\":\"https:\/\/www.stepbystepschools.net\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.stepbystepschools.net\/?p=649#primaryimage\"},\"datePublished\":\"2016-01-13T04:52:54+00:00\",\"dateModified\":\"2016-01-13T04:52:54+00:00\",\"author\":{\"@id\":\"https:\/\/www.stepbystepschools.net\/#\/schema\/person\/88d563b9535849b699d9b5efa09d559c\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.stepbystepschools.net\/?p=649#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.stepbystepschools.net\/?p=649\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.stepbystepschools.net\/?p=649#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.stepbystepschools.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ASP.NET MVC and Angular Training in Mumbai :- @Razor and JavaScript\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.stepbystepschools.net\/#\/schema\/person\/88d563b9535849b699d9b5efa09d559c\",\"name\":\"Sukesh Marla\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.stepbystepschools.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7f960ad602065c0f897d127d81b3adf8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7f960ad602065c0f897d127d81b3adf8?s=96&d=mm&r=g\",\"caption\":\"Sukesh Marla\"},\"sameAs\":[\"http:\/\/www.JustCompile.com\"],\"url\":\"https:\/\/www.stepbystepschools.net\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ASP.NET MVC and Angular Training in Mumbai :- @Razor and JavaScript - Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.stepbystepschools.net\/?p=649","og_locale":"en_US","og_type":"article","og_title":"ASP.NET MVC and Angular Training in Mumbai :- @Razor and JavaScript - Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai","og_description":"Again a big thanks to our students to make our MVC training in Mumbai Andheri successful. It was small batch of 4 people and this time we had some people travelling from Pune as well. One of the interesting learning &hellip; Continue reading &rarr;","og_url":"https:\/\/www.stepbystepschools.net\/?p=649","og_site_name":"Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai","article_published_time":"2016-01-13T04:52:54+00:00","og_image":[{"url":"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2016\/01\/1-300x63.jpg"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sukesh Marla","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.stepbystepschools.net\/#website","url":"https:\/\/www.stepbystepschools.net\/","name":"Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai","description":"MVC 5\/Core, AngularJS 1.x, 2.0, 4.0, Design Pattern, Architecture, SSIS, SSAS, SSRS, Data Science, Big data, Hadoop classroom training","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.stepbystepschools.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.stepbystepschools.net\/?p=649#primaryimage","url":"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2016\/01\/1-300x63.jpg","contentUrl":"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2016\/01\/1-300x63.jpg"},{"@type":"WebPage","@id":"https:\/\/www.stepbystepschools.net\/?p=649#webpage","url":"https:\/\/www.stepbystepschools.net\/?p=649","name":"ASP.NET MVC and Angular Training in Mumbai :- @Razor and JavaScript - Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai","isPartOf":{"@id":"https:\/\/www.stepbystepschools.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.stepbystepschools.net\/?p=649#primaryimage"},"datePublished":"2016-01-13T04:52:54+00:00","dateModified":"2016-01-13T04:52:54+00:00","author":{"@id":"https:\/\/www.stepbystepschools.net\/#\/schema\/person\/88d563b9535849b699d9b5efa09d559c"},"breadcrumb":{"@id":"https:\/\/www.stepbystepschools.net\/?p=649#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.stepbystepschools.net\/?p=649"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.stepbystepschools.net\/?p=649#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.stepbystepschools.net\/"},{"@type":"ListItem","position":2,"name":"ASP.NET MVC and Angular Training in Mumbai :- @Razor and JavaScript"}]},{"@type":"Person","@id":"https:\/\/www.stepbystepschools.net\/#\/schema\/person\/88d563b9535849b699d9b5efa09d559c","name":"Sukesh Marla","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.stepbystepschools.net\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7f960ad602065c0f897d127d81b3adf8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7f960ad602065c0f897d127d81b3adf8?s=96&d=mm&r=g","caption":"Sukesh Marla"},"sameAs":["http:\/\/www.JustCompile.com"],"url":"https:\/\/www.stepbystepschools.net\/?author=2"}]}},"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=\/wp\/v2\/posts\/649"}],"collection":[{"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=649"}],"version-history":[{"count":2,"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=\/wp\/v2\/posts\/649\/revisions"}],"predecessor-version":[{"id":653,"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=\/wp\/v2\/posts\/649\/revisions\/653"}],"wp:attachment":[{"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}