Different types of Action Results in MVC

InMVCcontroller may have one or more actions and can return different type of result like if you want to return Json, JavaScript, empty result, return view etc. ActionResults is the base class of all result type. ActionResults is abstract class. As ActionResults is the base class for all type of action results this means return type of ActionResults can be any of the below listed result types. In this topic we will learn how to use ViewResult, PartialViewResult, RedirectResult and JsonResult.

1.ViewResult (View): This return type is used to return a webpage from an action method.
2. PartialviewResult (Partialview): This return type is used to send a part of a 

    view which will be rendered in another view.
3. RedirectResult (Redirect): This return type is used to redirect to any other 

    controller and action method depending on the URL.
4. RedirectToRouteResult (RedirectToAction, RedirectToRoute): This return 

    type is used when we want to redirect to any other action method.
5. Conte…

Advantages of MVC

1. One of the main advantage is that it will be easier to manage the complexity as the application is divided into model,view and controller.

2. It gives us the full control over the behavior of an application as it does not use view state or server-based forms.

3. It provides better support for test-driven development (TDD).

4. You can design the application with a rich routing infrastructure as it uses a Front Controller pattern that processes Web application requests through a single controller.

google-site-verification: google60f25276d1e291a2.html

google-site-verification: google60f25276d1e291a2.html

Create and Schedule a Job in SQL Server 2008

SQL Server agent can be used to create JOBS which can be scheduled to execute automatically. SQL Server Agent uses SQL Server to store job information. Jobs can have one or more job steps. Each step contains its own task.Each action in a job is a job step.We can schedule the job based on need as daily, weekly, monthly, hourly etc For example, Let us create a job to back up a database automatically. Steps to create Job in SQL Server Agent 1. Expand SQL Server Agent in Object Explorer.(If SQL Server Agent is stopped ,right click and start it) 2.Right click Job->New job. 3.Fill  the Name field with a  name for your job,Give description. 4. On the left side of the New Job window, you’ll see a Steps icon under the Select a page.Next add the individual steps for your job. Click the New button to create a new job step and you will see the New Job Step window. Use the Step Name textbox to provide a name for the Step. select the database where the job has to be applied.Use the Command textb…

How to setup your Blog with GoDaddy

GoDaddy DNS service supports this feature so Let's show you how it's done:
For this demo, I assume you have an existing blog and you have already purchased a domain on GoDaddy.

Step 1: Go to the Settings Tab of your blog in the Blogger UI and click on the "Add a custom domain" link.

Step 2: Enter the URL you would like to use for your blog and press Save. I'm using "" but the URL doesn't need to start with www such as "" where I published this article.

Step 3: You will get an error. It's expected as you have not configured GoDaddy with the DNS settings required. Now click on the "DNS settings file" link and save the file. Keep this window open, you'll need it later.

Step 4: In a new window, go to GoDaddy, login, go to the Domain Control Panel and click on your domain name.

Step 5: Click on the "DNS Zone File" tab.

How to Remove Blank Lines in Visual Studio

We can use regular expressions to find blank lines and replace them with white spaces.

Following steps are to find blank lines and replace:

In visual studio 2012.

1. Press “ Ctrl+ Shift + H “.

And window shown like:

2. Write regular expression For (vs2012) "^(?([^\r\n])\s)*\r?$\r?\n" or for vs 2010 (^$\n or ^&\n)in find what box.

3. Leave Replace with box as empty.

4. In find check Use Regular Expressions.

Then Replace or Replace all as you want.

These steps will remove all blank spaces from current document or whole project as you choose Look in box.

Other regular expressions are predefined by visual studio as in below image.(or can see by (a)+ button on find what box).

What is IIS - Internet Information Server

Internet Information Server (IIS) is one of the most popular web servers from Microsoft that is used to host and provide Internet-based services to ASP.NET and ASP Web applications. A web server is responsible for providing a response to requests that come from users. When a request comes from client to server IIS takes that request from users and process it and send response back to users.

Internet Information Server (IIS) has it's own ASP.NET Process Engine to handle the ASP.NET request. The way you configure an ASP.NET application depends on what version of IIS the application is running on.

Internet Information Server (IIS) includes a set of programs for building and administering Web applications, search engines, and support for writing Web-based applications that access databases such as SQL Server. With IIS, you can make your computer to work as a Web server and provides the functionality to develop and deploy ASP.NET Web applications on the server. You can also set securi…