Tuesday, 21 January 2014

Hello World Example in ASP.Net MVC


Controller
  •       Contains Action

Hello World Example in Asp.Net MVC 


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MvcApplication2.Controllers
{
    public class HelloWorldController : Controller
    {
        //
        // GET: /HelloWorld/


        public string Index()
        {
            return "This is Action and saying Hello World...";
        }

        // GET: /HelloWorld/Welcome
        public string Welcome()
        {
            return "This is the Welcome action method created by me";
        }
    }
}

Welcome is Action and HelloWorld is Controller

By default we have Index Action Method.

Related Posts:

  • Simple GridView Android GridView Android : Gridview is similar to listview in Android but with more column . In listview we have rows, but in grid we have columns. if you … Read More
  • Basic Building Blocks of Android Building Blocks in Android are : Activities Services  BroadCast Receiver Content Provider Activity : Activity is just a class . A class whi… Read More
  • Constraint Layout Android Constraint Layout in Andorid : Q: Why Constraint Layout in Android ? What is the need to use Constraint Layout? There are some Problems … Read More
  • Simple ListView Tutorial Simple ListView Android Today we will learn how to create a Simple ListView in Android. The ListView is a view group that displays a list of vertica… Read More
  • Background Image Size in Android Background Image Size : Background image size for image is different for a different resolution . If a have hdpi screen, the size of image is differ… Read More

0 comments:

Post a Comment