Moving ASP.NET Designer Generated Code to Separate Designer.vb File

Moving ASP.NET Designer Generated Code to Separate Designer.vb File - Hallo sahabat Jendela Dunia Internet Dan Tekhnologi, Pada Artikel yang anda baca kali ini dengan judul Moving ASP.NET Designer Generated Code to Separate Designer.vb File, kami telah mempersiapkan artikel ini dengan baik untuk anda baca dan ambil informasi didalamnya. mudah-mudahan isi postingan Artikel ASP.NET, Artikel Designer, Artikel Visual Studio, yang kami tulis ini dapat anda pahami. baiklah, selamat membaca.

Judul : Moving ASP.NET Designer Generated Code to Separate Designer.vb File
link : Moving ASP.NET Designer Generated Code to Separate Designer.vb File

Baca juga


Moving ASP.NET Designer Generated Code to Separate Designer.vb File

Introduction

If you’ve converted an an ASP.NET application from versions of Visual Studio 2003 and earlier to 2005 and beyond, you’ll notice the converted web pages behave slightly differently than those natively generated in new projects. The difference is that designer generated code used to have to live inline with developer code because all class properties needed to exist within the same file.

Solution

Starting in .NET 2.0, the compiler can now use the partial keyword which allows you to split up the declaration of a class over n number of files. The paved the way for Visual Studio to break apart the ugly code it generates from the (hopefully) beautiful code you’ve written. To make use of this feature on old asp.net web applications that have been converted to a compatible version of visual studio, simply do the following two steps.

5 Easy Steps

  1. Take the entire region label Web Form Designer Generated Code and Delete it from your code behind file:

  2. Our Solution Explorer currently looks likes this:

  3. Right Click on the .aspx or .ascx page and Select Convert to Web Application

  4. It will add a designer file with all the code we just deleted:

  5. Of course, if you turn of “Show All Files”, you’ll still only see the page in your solution explorer

And that’s it! Now enjoy the faster design time analysis and cleaner code that comes from separating your generated code and your written code.



Demikianlah Artikel Moving ASP.NET Designer Generated Code to Separate Designer.vb File

Sekianlah artikel Moving ASP.NET Designer Generated Code to Separate Designer.vb File kali ini, mudah-mudahan bisa memberi manfaat untuk anda semua. baiklah, sampai jumpa di postingan artikel lainnya.

Anda sekarang membaca artikel Moving ASP.NET Designer Generated Code to Separate Designer.vb File dengan alamat link http://jendeladuniainternet.blogspot.com/2013/07/moving-aspnet-designer-generated-code.html

0 Response to "Moving ASP.NET Designer Generated Code to Separate Designer.vb File"

Posting Komentar