Archive for the ‘ .NET Technology ’ Category

ASP.NET MVC

For the past few years, ASP.NET has proved to be a very mature, stable and beneficial web development platform for all its users. However, with the recent new versions of the other systems now available in the market, the previous version of ASP.NET seems a bit aged. As a result another alternative of the ASP.NET was designed. The Model-View-Controller is the perfect ASP.NET alternative available.

An absolutely free web framework, ASP.NET MVC 2.0 offers you the complete control over your URL and HTML page. It is designed exceptionally by keeping both SoC (Separation of Concerns )  and testability in mind. The system aids AJAX scripting while also encouraging the test-driven development. ASP.NET MVC as compared to the runtime environment of ASP.NET offers you a completely different experience of using Web Forms. The new alternative uses the Web based variation from the MVC pattern while the 2.0 version works on both, Visual Studio 2008/.Net 3.5 and the Visual Studio 2010 /.Net 4.

Programs based on ASP.NET MVC usually use controllers and views. However, finally you have to decide on how the data will be passed for viewing and exposing your information to the other controllers. The requests made are mainly resolved by simply invoking the required method on the controller class. In order to service the user requests and save the page state, no postbacks and viewstates are required. Hence, no server controls are needed for producing the HTML pages. Above all, ASP.NET MVC in the IT services field is mainly based on handling the HTTP requests except the case that the URL string is treated in a different manner.

The URL in ASP.NET MVC points out to an action to occur and not to a simple file to be processed. Every single URL includes simple routing details especially for the front controllers in order to identify the main target controller. Moreover, ASP.NET MVC is not bound to both server controls and other similar rendering technologies.

SeekDotNet support ASP.NET MVC 2 at all of our hosting plan. Singup now and start to build your ASP.NET MVC 2 website.

What’s New in Visual Basic 2010

Visual Basic Compiler and Language

Auto-Implemented Properties

Auto-implemented properties provide a shortened syntax that enables you to quickly specify a property of a class without having to write code to Get and Set the property.

Collection Initializers

Collection initializers provide a shortened syntax that enables you to create a collection and populate it with an initial set of values. Collection initializers are useful when you are creating a collection from a set of known values, for example, a list of menu options or categories.

Implicit Line Continuation

In many cases, implicit line continuation enables you to continue a statement on the next consecutive line without using the underscore character (_). For a list of all the cases in which you can omit an underscore character.

Multiline Lambda Expressions and Subroutines

Lambda expression support has been expanded to support subroutines in addition to multiline lambda functions and subroutines.

New Command-Line Option for Specifying a Language Version

The /langversion command-line option causes the compiler to accept only syntax that is valid in the specified version of Visual Basic.

Type Equivalence Support

You can now deploy an application that has embedded type information instead of type information that is imported from a Primary Interop Assembly (PIA). With embedded type information, your application can use types in a runtime without requiring a reference to the runtime assembly. If various versions of the runtime assembly are published, the application that contains the embedded type information can work with the various versions without having to be recompiled.

Dynamic Support

Visual Basic binds to objects from dynamic languages such as IronPython and IronRuby.

Covariance and Contravariance

Covariance enables you to use a more derived type than that specified by the generic parameter, whereas contravariance enables you to use a less derived type. This allows for implicit conversion of classes that implement variant interfaces and provides more flexibility for matching method signatures with variant delegate types. You can create variant interfaces and delegates by using the new In and Out language keywords. The .NET Framework also introduces variance support for several existing generic interfaces and delegates, including the IEnumerable(Of T) interface and the Func(Of TResult) and Action(Of T) delegates.

Integrated Development Environment

The following sections describe enhancements to the Visual Studio integrated development environment (IDE).

Navigate To

You can use the Navigate To feature to search for a symbol or file in source code. You can search for keywords that are contained in a symbol by using Camel casing and underscore characters to divide the symbol into keywords.

Highlighting References

When you click a symbol in source code, all instances of that symbol are highlighted in the document.

For many control structures, when you click a keyword, all of the keywords in the structure are highlighted. For instance, when you click If in an If…Then…Else construction, all instances of If, Then, ElseIf, Else, and End If in the construction are highlighted.

To move to the next or previous highlighted symbol, you can use CTRL+SHIFT+DOWN ARROW or CTRL+SHIFT+UP ARROW.

Generate From Usage

The Generate From Usage feature enables you to use classes and members before you define them. You can generate a stub for any class, constructor, method, property, field, or enum that you want to use but have not yet defined. You can generate new types and members without leaving your current location in code. This minimizes interruption to your workflow.

IntelliSense Suggestion Mode

IntelliSense now provides two alternatives for IntelliSense statement completion: completion mode and suggestion mode. Suggestion mode is used when classes and members are used before they are defined.

SeekDotNet.com support the latest ASP.Net technology which is ASP.NET 4.0 Framework. Singup with us today!

ASP.NET 4 Hosting Supported on All SeekDotNet Hosting Plans

Microsoft has just released .NET 4 Framework together with ASP.NET 4 and Visual Studio 2010 final version to public. ASP.NET 4 and Visual Studio 4 contains lots of improvement, and new functionality that can help and ease programmers in building faster and better applications.

Below are some of the improvements from . NET 4 Framework and Visual Studio 2010 compare previous version .NET 3.5 Framework and Visual Studio 2008

  1.  Clean Web Config Files
  2. Starter Project Templates
  3. Multi Targeting
  4. Multiple Monitor Support
  5. HTMl/ASP.NET/Javascript code snippets
  6. URL Routing and ASP.NET 4 Web Forms
  7. Searching and Navigating Code in VS 2010
  8. Intellisense Improvements
  9. SEO Improvements with ASP.NET 4.o
  10. Build in Charting Controls for ASP.NET 4 and Windows Forms
  11. Cleaner HTML Markup
  12. Add Reference Dialog Improvements
  13. JavaScript Intellisense Improvements with VS2010
  14. WPF 4

I will explain some of the cool new features of ASP.NET 4 in terms of the html output. Lots of developers of ASP.NET have a hard time on writing Javascript to reference the ASP.NET Web Forms elements  because ASP.NET normally output the form elements in the format of  ctl00_ContentPlaceholder1_ListView1_ctrl0_Label1.  This makes increment in terms of page size and harder to style the elements using CSS or programming using JavaScript.
ASP.NET 4 allow us to have a full control on the ID being generated to the client

New ClientIDMode Property on Controls

ASP.NET 4 supports a new ClientIDMode property on the Control base class.  The ClientIDMode property indicates how controls should generate client ID values when they render.  The ClientIDMode property supports four possible values:

  • AutoID—Renders the output as in .NET 3.5 (auto-generated IDs which will still render prefixes like ctrl00 for compatibility)
  • Predictable (Default)— Trims any “ctl00” ID string and if a list/container control concatenates child ids (example: id=”ParentControl_ChildControl”)
  • Static—Hands over full ID naming control to the developer – whatever they set as the ID of the control is what is rendered (example: id=”JustMyId”)
  • Inherit—Tells the control to defer to the naming behavior mode of the parent container control

The ClientIDMode property can be set directly on individual controls (or within container controls – in which case the controls within them will by default inherit the setting)

Or it can be specified at a page or usercontrol level (using the <%@ Page %> or <%@ Control %> directives) – in which case controls within the pages/usercontrols inherit the setting (and can optionally override it):

Or it can be set within the web.config file of an application – in which case pages within the application inherit the setting (and can optionally override it):
Example of the output files on ASP.NET 3.5 or had ASP.NET 4 application configured to run using 3.5 rendering or ClientIDMode=AutoID

Markup Rendering when using ASP.NET 4 and the ClientIDMode is set to “Predictable”

Markup Rendering when using ASP.NET 4 and the ClientIDMode is set to “Static”

This is just an introduction of ASP.NET 4 new features and improvements. If  you need more information, please refer to www.asp.net.

For all developers out there who wants to use this new ASP.NET 4 features, can signup with SeekDotNet Hosting Plans. All SeekDotNet Hosting plans now support .NET 4 Framework and ASP.NET 4 Hosting.