• Home
  • About
  • BestBloggingIdeas
  • DotNetLearningSource
  • FORUM
  • Joblinks
  • Latest News
  • Policy
  • POSTS
  • SimplySqlServer.Com && SimplyAspDotNet.Com
  • Sitemap

Join Ours Forum

Asp.Net,C#,Ajax,Sql server,silverlight,Javascript codes exambles articles,Programming exambles

RSS Feed
  • Bounty Huge Roll [Amazon Frustration-Free Packaging]
  • XML Introduction to XML VHS Video Training, 1 hr., 32 minutes.
  • The Basic Overview of Windows Mobile Development Asp.Net C#
  • Overview of Sql server extended properties Asp.Net C#
  • How to Use Sql Server Extended properties using visual studio Asp.Net C#
  • Adobe Dreamweaver Templates Accelerate Web Development
  • Top Tips for Web Design Projects
  • How to Achieve a Good Web Design Structure
  • To Use Or Not To Use Website Templates
  • Five Tips to a Successful Website
  • Top 10 Articles,


    Silverlight Datagrid Select Update Delete Insert Asp.Net C#

    Differences Similarities Benefits Between Typed Datasets and Untyped Datasets asp.net c#

    Linq to Sql Introduction Entities Ado.Net C# SqlClasses Attributes Linq Mapping

    Linq Programming/How Linq Works?/Linq Implementation In Asp.Net C# Ado.Net

    Performing Developing Using Investigating Asp.Net 2.0 Ajax Application Development Asp.Net C#

    Hosting/Install Wcf Services in a Windows Service Asp.Net C#

    Connecting Silverlight to Wcf Asp.Net C#

    Silverlight Data Grid Data Binding WCF Asp.Net C#

    Invoking/Accessing/Calling WCF Service Without Adding/Creating Proxy/Reference Asp.Net C#

    Performing Doing Creating Insert Update Delete sql data Using Linq Database Asp.Net C#

    creating/first asp.net mvc web application c# asp.net model view pattern

    Posted by on July 28, 2010 Leave a comment (12) Go to comments

    Introduction:
    In this article, i am going explain about how to create a asp.net mvc web application using asp.net.

    Main:
    For creating asp.net mvc web application please goto file –> new –> project and select asp.net
    mvc2 template,
    mvc1

    After clicking on OK, Visual Studio will ask you if you want to create a test project. This dialog
    offers the choice between several unit testing frameworks that can be used for testing your ASP.NET
    MVC application.
    mvc23
    You can decide for yourself if you want to create a unit testing project right now—you can also add
    a testing project later on. Letting the ASP.NET MVC project template create a test project now is
    convenient because it creates all of the project references, and contains an example unit test, although
    this is not required. For this example, continue by adding the default unit test project.
    mvc3

    After the ASP.NET MVC project has been created, you will notice a default folder structure. There’s a
    Controllers folder, a Models folder, a Views folder, as well as a Content folder and a Scripts folder.
    ASP.NET MVC comes with the convention that these folders (and namespaces) are used for locating the
    different blocks used for building the ASP.NET MVC framework. The Controllers folder obviously contains
    all of the controller classes; the Models folder contains the model classes; while the Views folder contains
    the view pages. Content will typically contain web site content such as images and stylesheet files, and
    Scripts will contain all of the JavaScript files used by the web application. By default, the Scripts folder
    contains some JavaScript files required for the use of Microsoft AJAX or jQuery.

    see this below demonstration,

    Allready we discussed view is just used html resources,so just add a new webpage under view and named it
    welcome.aspx,

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WelCome.aspx.cs"  Inherits="System.Web.Mvc.ViewPage" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        <asp:Content ID="Content1"
         ContentPlaceHolderID="MainContent"
         runat="server">
     
          <h1><%=ViewData["Welcomestring"]%></h1>
     
        </asp:Content>
     
        </div>
        </form>
    </body>
    </html>

    here we are just trying to display welcome string using viewstate,

    We allready discussed all business logic’s are coming under model,here we are returning a simple welcome string,so
    i just added the properties for that welcomestring,
    mvc4
    <

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Mvc;
     
    namespace mvcdemo.Models
    {
        public class WelcomeString : Controller
        {
            //
            // GET: /WelcomeString/
            public class welcomestr
            {              
     
                //return View("Welcome to MVC,its really very easy and cool");
                public string Getstring { get; set; }
            }        
     
        }
    }

    next we need to create a controller for working with the html page,

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Mvc;
    using mvcdemo.Models;
     
    namespace mvcdemo.Controllers
    {
        public class WelcomeController : Controller
        {
            //
            // GET: /Welcome/
     
            public ActionResult Index()
            {
                WelcomeString.welcomestr objwel = new WelcomeString.welcomestr();
                objwel.Getstring = "Welcome to MVC,its really very easy and cool";
     
                ViewData["Welcomestring"] = objwel.Getstring;
                return View();
            }
     
        }
    }

    thatsit!

    Conclusion:
    Hope this simple program helps you to understand about MVC,
    Happy coding.

    ASP.NET
    ← Overview of MVC architecture MVC advantages and using in asp.net c#
    Exception Handling WCF Programming/Services Fault Exception Asp.Net c# →

    Learn Easily Using Video Tutorials


    How to choose the right Java IDE – explained Eclipse NetBeans BlueJ

    Developing/Creating/Performing/Configuring Java Applications Using Eclipse IDE

    Step By Step Guide for Download/Install Configure Eclipse IDE for Java

    Editing data with the GridView control Asp.Net C#

    Registering/Configuring Web Controls globally in web.config file asp.net c#

    Registering/Configuring Web Controls globally in web.config file asp.net c#

    Best way to prepare asp.net Interview - Success Stories

    Download Important Questions and PPT's:

    Sql Server Important Questions Online free download

    Dotnet Important Questions Online free download

    Exploring Linq to Sql Process Flow

    Learn how to perform silverlight programming

    Learn OOPs concepts in better and well manner

    Learn Ajax in better and well manner

    Leave a comment

    12 Comments.

    1. mbia stock appreciation July 30, 2010 at 12:31 am

      Usually I do not post on blogs, but I would like to say that this article really forced me to do so! Thanks, really nice article.

    2. Garden Canopies August 10, 2010 at 12:49 pm

      Yeah! Excellent writing, keep up the tremendous work. This is the sort of info that ought to obtain acknowledgement pertaining to it’s craft. Far more authors ought to learn from you. This is actually right on the money.

    3. Emergency Vehicle Lights August 11, 2010 at 4:49 am

      I like your website. Very practical and very motivational. Thanks a bunch. This will help me a lot.

    4. Mini Light Bar August 11, 2010 at 5:06 am

      Just came upon your article and will check out additional ones. Looks like real good stuff.

    5. satellite dish tripod August 11, 2010 at 5:12 am

      That’s right! Excellent piece, keep in place the amazing job. This is the sort of info that ought to get acknowledgement pertaining to it’s workmanship. Far more internet writers should learn from you. This is actually right on the money.

    6. Snow Cone Syrup August 11, 2010 at 5:43 am

      I like your layout, the actual fact that your website is a tad bit different makes it so useful, I get tired of discovering the same stuff almost all of the time. I’ve I merely stumbled on this page by you Cheers.

    7. Melvin Brothern August 11, 2010 at 7:57 am

      Interesting write-up. Had been did you got all the information from… :)

    8. Randolph Egertson August 26, 2010 at 8:37 am

      Who needs newspapers when they have such a nice blog to read. I was really wondering on this subject so I went to Bing, typed my question and voila, here I landed. Such a pleasant surprise to get to your blog. Thank you for your time and for this wonderful post. Thank you smarte search engine for bringing me here.

    9. Exercise Balls December 16, 2010 at 2:04 am

      If you are open to having a guest blog poster please reply and let me know. I will provide you with unique content for your blog, thanks.

    10. zakładanie stron November 10, 2011 at 12:23 pm

      I was suggested this website by my cousin. I’m not sure whether this post is written by him as nobody else know such detailed about my difficulty. You are wonderful! Thanks!

    Leave a Reply Cancel reply

    Your email address will not be published. Required fields are marked *

    *

    *


    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Trackbacks and Pingbacks:

    • Webmaster Crap » Blog Archive » creating/first asp.net mvc web application c# asp.net model view … - Pingback on 2010/07/28/ 20:39
    • creating/first asp.net mvc web application c# asp.net model view … » WB Tips - Pingback on 2010/07/31/ 10:26

    Enter your email address:

    Delivered by FeedBurner

    • Recent Posts

      • Bounty Huge Roll [Amazon Frustration-Free Packaging]
      • XML Introduction to XML VHS Video Training, 1 hr., 32 minutes.
      • The Basic Overview of Windows Mobile Development Asp.Net C#
      • Overview of Sql server extended properties Asp.Net C#
      • How to Use Sql Server Extended properties using visual studio Asp.Net C#
    • Search by Tags!

      Application AspNet Basic between Black Bluetooth Build Business Collection Consultants Design Development Downloading effective Excel Experts Generics Implement Installing Interview Logic Management Microsoft Minutes Object Outlook Professional Programmer Programming Project Projects Questions Ready Select Server Services Silverlight Source Strings Studio Through using Visual Website Wordpress
    • Archives

      • August 2011
      • June 2011
      • May 2011
      • April 2011
      • March 2011
      • February 2011
      • December 2010
      • November 2010
      • October 2010
      • September 2010
      • August 2010
      • July 2010
      • June 2010
      • May 2010
      • April 2010
      • March 2010
      • February 2010
      • January 2010
      • December 2009
      • November 2009
      • October 2009
      • September 2009

    Copyright © 2012 NetProgrammingHelp.com

    Δ Top