Home SWOT Analysis How Strong U R? Articles About Us
Mahatma Gandhi Jawaharlal Nehru Bagat Singh Kamarajar Indira Gandhi

Oh Indian

In remembrance of the Independance day Aug 15, 2007

This site is dedicated to one and all who sincerely participated in freedom struggle. Let us try to fulfill their ambitions!
Skip Navigation Links

ASP.NET - Reusing the existing Web Form


Yes, you have made a lot of effort to make a form with all the functional codings and features. Do you need to put the same effort for all the forms. No Definitely not. Or atleast, I'm not doing that mistake. Because, once if a form is working perfectly and tested to 100% accuracy, it is easy to use this resource in order to make the new form with higher accuracy.

This seems interesting. Isn't it. But the effort to do this is very easy. Go ahead.

We need to use the following procedure:

  1. In the solution explorer, copy the web form which is working perfectly and paste it in the required folder. In the following example, I've copied and pasted the Default.aspx file.
    Copy and Paste the Existing Web Form
  2. Rename the new web form to a new form name.

    Rename the copied web form.
  3. Open the Code view of the new renamed form and rename the Class name as given below:
    Before renaming:
    ClassName before renaming

    After Renaming: Normally we will keep the form name itself as the class name.
    Class Name after renaming
  4. Put the new class name in the Inherits property of the new Form's Source view.
    Rename the Inherits Property in Source View
  5. That's all. Now the new form is ready. You need to change the front end as well as the back end a little bit in order to get a 100% working new form.
Comments from Users (1)
laminate flooring 01-Sep-2010 06:41:32 
Laminate flooring is an inexpensive type of flooring that offers the consumer many benefits and is relatively easy to install.
Before getting started here is a pro and a con of laminate flooring. Laminate flooring gives your floor that overall look of wood that can be enjoyed for years to come.
Leave a Reply
Name (Required)  
Mail (will not be published) (required)    
Website