Showing posts with label Asp.net website Development. Show all posts
Showing posts with label Asp.net website Development. Show all posts

Monday, 22 September 2014

What’s Interesting Microsoft ASP.NET Web API 2.2 for OData v4.0 has?

Asp.net Website Development
ASP.NET is one of the best web application frameworks that marketed and developed by Microsoft. It allows programmers to create dynamic websites by using excellent programming languages like C# or VB.NET.

ASP.NET is considered as a division of the .NET Framework and when coding ASP.NET applications, one can have access to classes in the .NET Framework. Using this language, you can easily build ASP.NET applications that deliver advantages from the type safety, common language runtime, inheritance, etc.

Now, ASP.NET comes with Web API OData 5.3 that can be installed by referring below given information.

Download

Users can find the runtime features that released as NuGet packages on the NuGet gallery. Using the NuGet Package Manager Console, you can install or update to the released NuGet packages.

Install-Package Microsoft.AspNet.OData -Version 5.3.0
Install-Package Microsoft.AspNet.WebApi.OData -Version 5.3.0

Documentation

If you are looking for tutorials and other documentation about ASP.NET Web API OData, then visit this link.

OData Core Libraries

ODataLib version 6.5.0 is used by Web API for OData v4

Some Amazing ASP.NET Web API OData 5.3 features are:
  • Support for Open Entity Types
An open type is also better known as structured type that comes with dynamic properties along with other properties that are declared in the type definition. One can simply add flexibility in their data models. For more information, see xxxx.
  • Support for $levels in $expand
The $levels query option can be easily used in $expand queries. For example:
  • Support for dynamic collection properties in open types
Previously, one can find a single value to a dynamic property. Collection values are there in dynamic properties in 5.3. If you are looking at the example, we find that in the following JSON payload, the emails property is a dynamic and is of collection of string type:

{
"Id": 1,
"Name": "Ben",
"Emails@odata.type": "#Collection(Edm.String)",
"Emails": [
"a@a.com",
"b@b.com"
]
}

  • Support for inheritance for complex types
One can inherit complex types from a base type. For example: the below given complex types could be defined by an OData service.
public abstract class Shape

{
public bool HasBorder { get; set; }
}

public class Point
{
public int X { get; set; }
public int Y { get; set; }
}

public class Circle : Shape
{
public Point Center { get; set; }
public int Radius { get; set; }

public override string ToString()
{
return "{" + Center.X + "," + Center.Y + "," + Radius + "}";
}
}

public class Polygon : Shape
{
public IList<Point> Vertexes { get; set; }
public Polygon()
{
Vertexes = new List<Point>();
}
}

Check out the EDM for this example:

<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:DataServices>
<Schema Namespace="ODataComplexTypeInheritanceSample" xmlns="http://docs.oasis-open.org/odata/ns/edm">
<ComplexType Name="Shape" Abstract="true">
<Property Name="HasBorder" Type="Edm.Boolean" Nullable="false" />
</ComplexType>
<ComplexType Name="Polygon" BaseType="ODataComplexTypeInheritanceSample.Shape">
<Property Name="Vertexes" Type="Collection(ODataComplexTypeInheritanceSample.Point)" />
</ComplexType>
<ComplexType Name="Point">
<Property Name="X" Type="Edm.Int32" Nullable="false" />
<Property Name="Y" Type="Edm.Int32" Nullable="false" />
</ComplexType>
<ComplexType Name="Circle" BaseType="ODataComplexTypeInheritanceSample.Shape">
<Property Name="Center" Type="ODataComplexTypeInheritanceSample.Point" />
<Property Name="Radius" Type="Edm.Int32" Nullable="false" />
</ComplexType>
<EntityContainer Name="Container">
</EntityContainer>
</Schema>
</edmx:DataServices>
</edmx:Edmx>

Known Issues and Breaking Changes

The known issues and breaking changes are described in this section in the ASP.NET Web API OData 5.3.

OData v4

Query Options

Problem: the use of nested $expand with $levels=max results in an incorrect expansion depth.

For example, given the following request:

~/Entities(6)?$expand=P($levels=2;$expand=D($levels=max))
This query would result in an expansion depth of 6, if MaxExpansionDepth is 5.

Bug Fixes and Minor Feature Updates

Several bug fixes and minor feature updates are included in this release. For complete list, you can click here.

Are you looking for a complete Asp.net website Development solution? Then contact Perception System for adopting ‘Asp.net Developer for hire’ service.

Thursday, 10 April 2014

What Interviewer asks to ASP.NET Beginners and Professionals?

In this tutorial, we are going to focus on essential and questions that generally ask by interviewer at the time of ASP.NET developer Interview. To make easy for job seeker, here we have listed 10 important questions. Hope it will work for you.


What HttpHandlers and HttpModules mean in ASP.NET?

HttpHandler is used by ASP.NET Engine that handles particular requests that based on its extensions. All requests coming for (.aspx) pages are handled by ASP.NET Page. It simply handles a specific request with a specific extension. But, there will be only one handler for particular request.

HttpModule is used by ASP.NET Engine for injecting some specific functionality with ASP.NET default functionality for all incoming requests despite its extensions. No doubt, number of built-in modules is available in ASP.NET HTTP Pipeline. However, writing custom HTTP module for performing some additional functionality for all incoming requests is one of the best alternatives.

What State Management means?

By nature, HTTP is a stateless protocol and thus, it requires protecting state between subsequent requests to server from one or more clients. And this mechanism is referred as State Management.

What are the State Management Techniques used in ASP.NET?

It can be divided into two types:

Client-Side State Management

  • View State
  • Control State
  • Hidden Fields
  • Cookies
  • Query String

Server-Side State Management

  • Application State
  • Session State
  • Profile Properties

Meaning of ViewState? OR Explain ViewState as State Management Technique.

One of the Client-Side State Management techniques, ViewState delivers page-level state management which means state is preserved subsequent requests to same page. Implementing this technique, one can simply store state of the page along with its controls in a hidden form field i.e. "__VIEWSTATE" and this field is again accessible on server when page is posted back with HTTP Request.

Looking into view source, you can easily find this hidden field as:<input type="hidden" name="__VIEWSTATE" value="wEPDwUKMTM4OTIxNTEzNA9kFgJmD2QWAgIBD2QWAgIDDxYCHgVzdHlsZQV" />

Its data is encoded in Base64 String encoded format.

Can ViewState be Enable/Disable?

Yes. It can be enabled or disables at different points:

Control Level

One can easily create specific control by setting EnableViewState property as follows:

Control.EnableViewState = false;
Page Level
We can enable/disable ViewState for a complete page as follows:
<%@ Page Language="C#" EnableViewState="false" %>
Application Level
For whole application, we can enable/disable views in configuration file as follows:
<pages enableViewState="false">
....
</pages>

How Session.Clear() is differ from Session.Abandon() in ASP.NET?

Session is a collection that stores data as Key/Value pair and thus, all the session values are cleared by Session.Clear() but doesn’t destroy the Session. However, the session object are destroyed by Session.Abandon(). We can also say that Session.Clear() is like removing all files that available inside the folder but Session.Abandon() means removing the "Root" folder.

What is the difference between Application and Session State?

Basically, application state is a common data repository for an application's all users and their all sessions. Moreover, session start is particular to a single user session. So, one can easily store data in application state object that is common for all users of a particular application as follows:

//Set Value
Application["UsersCounter"] = Convert.ToInt32(Application["UsersCounter"]) + 1;
//Retrieve Value
lblUsersCounter.Text = Application["UsersCounter"].ToString();
It is advisable to store small size values in application object. Session object can store data for particular session of user. Furthermore storage and retrieval is also simple for application object.
//Set Value
Session["ProductsCount"] = Convert.ToInt32(Session["ProductsCount"]) + 1;
//Retrieve Value
lblProductsCounter.Text = Session["ProductsCount"].ToString();

How Label Control and Literal Control are different?

A text inside <span> tags is rendered by a Label control in ASP.NET while just the text without any tags is rendered by a Literal Control. One can easily apply application styles by using its CssClass property with Label controls. However, it is better to go for a Literal control, if we don't want to apply style/formatting.

Hyperlink Vs LinkButton in ASP.NET

NavigateURL" property identifies hyperlink that just redirects to a given URL. However, through a LinkButton, one can easily shows a Hyperlink style button that causes a postback to the same page but it doesn't redirect to a given URL.

These are some questions interviewer asking while taking interview. If you have some more questions in your mind related to Asp.net website Development then feel free to ask.

Moreover, if you are looking to hire Asp.net Developer from reliable development company, then Contact.

Sunday, 9 March 2014

4 Simple Steps to Follow for Developing Your First ASP.NET MVC5 Application


For accomplishing separation between different application components, Model-View-Controller is a great software pattern as it is considered the best choice for software apps. It is must that there should be clear separation between business logic and the user interface.

Accomplishing it is extremely easy with the help of MVC design that makes application more flexible to change. When it comes to ASP.NET MVC, it is one such framework that mainly based on MVC (Model-View-Controller) design pattern, and it can be used for developing web applications.

Microsoft has launched the latest version of its framework as MVC 5 that comes some amazing new features and boosting existing features also. When it comes to develop ASP.NET MVC5 application, one should follow below mentioned 4 easy steps that make their development process a lot easier:

  1. Developing MVC5 Project in Visual Studio 2013:

  • Firstly, developer needs to open Visual Studio Express 2013 for Web and develop “New Project” as File-->New Project.

  • Select “ASP.NET web application” template as shown in following figure. Developer should name the project as “MyFirstMVC5App", prefer location and press "OK" button.

  • Select MVC as template and again press “OK” button in next dialog.

  • All new ASP.NET MVC 5 project will be developed as follows as one can easily find the “Controllers”, “Models” and “Views” folder in solution explorer.

  1. Preparing a Model:

  • Developer should right click on “Models” folder and select “Add” and then “Class” to prepare a model.

  • Name the class as “Employee.cs”.

  • As we also discussed earlier that Model is the representation of data structure in Data Source that can assume this “Employee" class represents an Employee table in database with column as “EmpID", "EmpFirstName", "EmpLastName" and so on.

  1. Add Controller:

  • One should also right click on “Controllers” folder to add a controller to project and can select “Add” then Controller.

  • Select “MVC 5 Controller – Empty” from “Add Scaffold” dialog and press “Add” button as following:

  • One should name the controller as “EmployeeController” in next dialog and have to press “Add” as a new controller will be added to “Controllers” folder. Controller code generated will be as follows:

  1. Add a View:

  • When it comes to add a view, right click on newly developed “Employee” folder under views and selecting “Add” then MVC 5 View Page. Specify the name for the view "Index":

  • A new file with the name “Index.cshtml” will be added under “ Views->Employee" folder. I have added meaningful some text to this page.

  • Finally, developing a simple yet effective ASP.NET MVC 5 application has been created. To run the application, one should click CTRL+F5 that results will be follows:

Now, we are done with creating a simple ASP.NET MVC 5 application. To run the application, click CTRL + F5. At last, one should change the URL in browser from above to http://localhost:11517/Employee/ and press enter; still the output remains the same. If you are also looking to get ASP.Net website development, make sure to hire Asp.Net developer, who has years of experience in developing Asp.net industry.

Friday, 13 December 2013

Asp .net Website Development- Ideal for Online Business


Asp.Net Website Development
Present days, it becomes quite difficult to search out reliable Asp .net Website Development companies, who have already created many different types of projects successfully in same framework. It is must to find out such company that almost completed complex as well as simple problems by delivering the most accurate solution for Microsoft ASP.NET development. Moreover, it is also best if company is a Microsoft application development partner, who has ability of developing business application by using standard project management processes with proven methodologies. If we are concerning ASP.NET application development, it is one of the latest technology trends that improve the user experience according to the client’s requirements.

The retailers are expected to complete investigation, development, and exploitation and preservation process in complete competence. Choosing a perfect and experienced software development companies make sure to deliver excellent scalable and reliable project. Some companies are also looking for customization at the time of development stage according to client’s requirements and aligned to their business processes and thus, enterprise will get cutting-edge applications that ensure to have a good ROI.

One of the best things about .NET framework is it delivers various problems that have been problematic for many developers in their past. In latest version of ASP.NET, developers will find different types of issues related to memory leakage, deployment of applications and other security matters. Apart from the Asp .net Website Development, users can also create powerful desktop applications on the basis of latest functional class libraries of the framework. Looking at the Microsoft .NET, it is an excellent combination of information, users, and diverse program systems with hardware that joins various technologies with the incorporation of significant information at planned junctures.

There is uncountable number of developers provided by .NET technology for developing easy to use information systems. The best thing about business is they can integrate new applications with existing systems, and devices easily as the nature of .NET is platform independent. The main benefit of using .NET technology is to minimize code for better results and marvelous performance. Its web pages can be easily attributed with collection of latest form submission and client authorization easily. For developers, this language is like a boon as they can able to choose any language for creating applications. Asp .net website development is one of the best options, if one can choose an appropriate service providers and Software Development Company. Are you looking for an experienced Asp .net Website Development Company to hire Asp.Net developer? Contact us with your requirements.