Tuesday , 3 December 2024
Breaking News

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.

Check Also

ASP.NET Core 2.1

When it comes to build web applications and services, what framework you usually use? ASP.NET …

[email protected] [email protected]