Remove unused reference (Using)

When we are create any .aspx page,Automatically create some reference add on the page like
  1. using System;  
  2. using System.Collections.Generic;  
  3. using System.Linq;  
  4. using System.Web;  
  5. using System.Web.UI;  
  6. using System.Web.UI.WebControls;  
You know all reference no need on every pages. Suppose we have no used Linq in our project so why reference add this. If we want remove reference one by one lot of time waste and have no idea which reference are used or not. So I decided some trick are used for this work. Don't worry .net provided solution. Right Click on aspx.cs page any where like

you can see above picture select the Organize Usings. After select Remove Unused Usings.

Remove the some Reference.
  1. using System.Collections.Generic;  
  2. using System.Linq;  
  3. using System.Web;  
  4. using System.Web.UI;  
  5. using System.Web.UI.WebControls;  
After Remove the some Reference.
  1. using System;  
  3. namespace WebApplication1  
  4. {  
  5. public partial class testing : System.Web.UI.Page  
  6. {  
  7. protected void Page_Load(object sender, EventArgs e)  
  8. {  
  10. }  
  11. }  
  12. }  
Ebook Download
View all
View all