OK, szoval regen VS 2003.NET -et hasznaltam, most meg 2008-at. Olyan erzes mint amikor uj helyre koltozik az ember. Semmit se talal elsore, minden mashol van, es tiszta frusztraltan erzi magat.
Szoval a multkori bejegyzesemben irtam/hivatkoztam az autoEventWireup kikapcsolasara mint teljesitmenyjavito eljaras. Nos ez nehezebbnek bizonyult mint azt vartam. VS 2003-ban .NET 1.1-ben ez tiszta ugy volt. olyan szep kodot generalt a Visual studio:
/// <summary>
 /// Summary description for AdminResurce.
 /// </summary>
public class AdminResurce : System.Web.UI.Page
 {
  protected System.Web.UI.WebControls.DataGrid DataGridResource;
...
#region Web Form Designer generated code
  override protected void OnInit(EventArgs e)
  {
   //
   // CODEGEN: This call is required by the ASP.NET Web Form Designer.
   //
   InitializeComponent();
   base.OnInit(e);
  }
 Â
  /// <summary>
  /// Required method for Designer support - do not modify
  /// the contents of this method with the code editor.
  /// </summary>
  private void InitializeComponent()
  {  Â
   this.DataGridResource.ItemCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.DataGridResource_ItemCommand);
...
this.Load += new System.EventHandler(this.Page_Load);
Most se InitializeComponent, se OnInit, minden oldalra automatikusan beirja az AutoEventWireup=”ture”-t, ha kikapcsolom, akkor persze nem mukodik a Page_Load (csak ha kezzel letrehozom a megfelelo OnInit kodot). Ha Website-hoz kapcsolodok, es ott hozok letre webformot, akkor meg csak a kontrollokat se latom (amiket Web Application projectnel a *.aspx.designer.cs-be pakol: protected global::System.Web.UI.HtmlControls.HtmlForm form1; )
A templatek itt talalhatok : C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplatesCache\Web\CSharp\1033\WebForm.zip
Szandekosan butitja a microsoft a visual studiojat, hogy tobb programozasi konyvet, meg tanfolyamot tudjon eladni?
autoEventWireup is hard-coded into templates making changing the default stupidly time-consuming
http://blog.dantup.me.uk/2007/08/autoeventwireup-still-broken-in-visual.html