Showing posts with label Techaltum. Show all posts
Showing posts with label Techaltum. Show all posts

Thursday, 9 January 2014

Scaffolding using LINQ in MVC

Scaffolding using LINQ in MVC
Scaffolding is the option in MVC which provide the facility to generate automatic code page for certain functionality like List, insert, update, delete etc. It is the major tool which provides quick way to generate code.

In this example I am using LINQ to generate back-end part. In my next article series I will show the same example using Entity Framework.

If you are new to LINQ then kindly first study the following link then studies this article.


I am using following table to generate scaffolding option:-

Wednesday, 6 November 2013

Fetch values from View in Controller using Form Collection


Fetch values from View in Controller using Form Collection

In this article I will explain how to fetch data from controls which are on View to Controller. There are many ways to fetch these values and Form Collection is the one of them.

In my one of last article I explained the GET and POST method. And in POST method I showed that data stored in FORM if Method set as POST. I also explained that data stored using the controls property Name.

Note: - if you are not aware the concept of GET and POST in MVC then kindly Click Here.

As we know that if our method set as POST then all data stored in Form so we can access this data on our controller using FormCollection.

Monday, 4 November 2013

Form Tag in MVC View and use of GET and Post method in MVC


Form Tag with some input tag in MVC View and use of GET and POST Method in MVC

In MVC we use GET and POST Method to Each Request and Reply. If we do not set any method for MVC Application then it uses GET Method by Default.

For Example:-

Create a simple MVC Application. Create Home controller and create index view. Simply print Some String in this view and Execute this code.

Note: - To understand basic of MVC kindly read my previous articles: - Controller in MVC and View in MVC

After executing the code you will get following output.



Figure 1

Now press the F12 to open the DevTool. Developers Tool is a Debugging Tool in Chrome which provides accessibility of Web Application in Detail.



Figure 2

Now create another view in this application. Create another method name Welcome in Home Controller and create view for this method. Execute the application and request the Welcome View and then press F12



Thursday, 22 August 2013

Basic Introduction of View in MVC

   Basic Introduction of View in MVC with some input element and JavaScript

If you are beginner than i will suggest you to first read my first article which describe the basic of MVC and use of Controller

In MVC “V” stands for View. View is basically a User Inerface(UI) in MVC.

In this article I am just giving an introduction of VIEW.

In MVC we can create view in two manner which is either in .aspx form or in Razor which is in .cshtml or .vbhtml.

Razor is very powerful concept which is introduced in MVC 3. Razor is simply a new programming language which allows you to embed your C# and VB code with HTML.
When we create Razor for C# then it add .cshtml file but when we create Razor with vb then it add .vbhtml file.

In my next article series I will discuss Razor with its syntax in detail.

For this article I am focusing on how to create view, how to call view from controller etc.

For example:-



Wednesday, 21 August 2013

MVC Introduction with Controller

Written By:-Isha Malhotra 
Our Website:-www.techaltum.com    
MVC basic Introduction

MVC stands for Model – View – Controller. It is another way to create web based application. As compare to Asp.net form based application it is quite light weighted.

MVC framework separates the application into three major components which is as follows:-

MODAL: - In MVC Framework we put all business logic of application into the modal.

VIEW: - In MVC Framework View is known as User Interface (UI).

Controller: - Controller handles all user input and requests in MVC.
Before going into deep in MVC let’s discuss the basic introduction of each component. In this article I am discussing about the Controller.

Read More