Monthly Archives: June 2017

Artifacts in Team City

Hi All, Build artifacts are out put files by the build which are stored on Team City server.From General Settings page of the Build Configuration, we can specify explicit paths to build Artifacts or patterns to define Artifacts of a build.Upon the build finish, TeamCity searches for artifacts in the build checkout directory according to… Read More »

Build Steps in Team City

Hi, Build steps can be configured from Build Steps section of Build Configuration Settings page. The steps can be auto-detected by Team City or added manually. Each build step is represented by a build Runner Type and provides integration with a specific build or test tool. We can add as many build steps to our… Read More »

What are partial views in MVC?

Hi All, Partial view is a reusable view which can be embedded inside other view.Like a user control it can be used in different areas of a page. It can used with left menu, header and footer as shown in the image below. Once the partial view is created we can call the partial view… Read More »

Routing in MVC?

Hi All, Routing helps us to give user friendly URL structure. Helps to map those URL structure to the controller.When any user types “http://localhost/View/ViewStudent/” , it will goes to the “Customer” Controller and invokes “DisplayStudent” action. This is defined by adding an entry in to the “routes” collection using the “maproute” function.

What is the difference between tempdata , viewdata and viewbag?

Temp data: Helps to maintain data when you move from one controller to other controller or from one action to other action. In other words when you redirect,“tempdata” helps to maintain data between those redirects. It internally uses session variables. View data: Helps to maintain data when you move from controller to view. View Bag: … Read More »

How can we restrict MVC actions to be invoked only by GET or POST?

Hi Friends, We can decorate the MVC action by “HttpGet” or “HttpPost” attribute to restrict the type of HTTP calls. For instance you can see in the below code snippet the “DisplayCustomer” action can only be invoked by “HttpGet”. If we try to make Http post on “DisplayCustomer” it will throw an error.