###Index
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HomeController : Controller | |
{ | |
private readonly UmbracoHelper _umbracoHelper = new UmbracoHelper(UmbracoContext.Current); | |
public ActionResult Index() | |
{ | |
var node = _umbracoHelper.TypedContent(1000); | |
return View(node); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Handles the login form when user posts the form/attempts to login | |
/// </summary> | |
/// <param name="model"></param> | |
/// <returns></returns> | |
[HttpPost] | |
public ActionResult HandleLogin(LoginViewModel model) | |
{ | |
if (!ModelState.IsValid) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('ymusica').controller('AlbumSearch', ['$scope', 'Albums', 'Artists', '$q', function($scope, albums, artists, $q) { | |
$scope.albums = []; | |
$scope.artists = []; | |
var terms = new Rx.Subject(); | |
$scope.searchMusic = terms.onNext.bind(terms); | |
terms.sample(250) |
1.In which assembly is the MVC framework defined? System.Web.Mvc
2.What is ViewData, ViewBag and TempData?
MVC offers Three options for passing data from controller to View and in next request. ViewData & ViewBag are almost similar. Short life means value becomes null when redirection occurs. It’s a communication mechanism within the server call. Difference between ViewBag & ViewData:
- [Eloquent Javascript] (http://eloquentjavascript.net/) ( No prior programming knowledge required ) 🆓
- [JavaScript: The Good Parts] (http://shop.oreilly.com/product/9780596517748.do)
- [Learning JavaScript Design Patterns] (http://addyosmani.com/resources/essentialjsdesignpatterns/book/) 🆓
- Browser/Web - [Docs] (https://developer.mozilla.org/en-US/docs/JavaScript/Reference)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model UmbracoLogin.MemberLoginModel | |
@if (User.Identity.IsAuthenticated) | |
{ | |
<p>Logged in: @User.Identity.Name</p> | |
<p>@Html.ActionLink("Log out", "MemberLogout", "MemberLoginSurface")</p> | |
} | |
else | |
{ | |
using (Html.BeginUmbracoForm("MemberLogin", "MemberLoginSurface")) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model UmbracoLogin.MemberLoginModel | |
@if (User.Identity.IsAuthenticated) | |
{ | |
<p>Logged in: @User.Identity.Name</p> | |
<p>@Html.ActionLink("Log out", "MemberLogout", "MemberLoginSurface")</p> | |
} | |
else | |
{ | |
using (Html.BeginUmbracoForm("MemberLogin", "MemberLoginSurface")) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using EPiServer.Shell.ViewComposition; | |
using EPiServer.Shell.Web; | |
using EPiServer.Cms.Shell; | |
using EPiServer.Cms.Shell.UI; | |
namespace testepi7.MyWidgets | |
{ | |
[Component( | |
PlugInAreas = "/episerver/cms/assets", | |
Categories = "cms", |