Re: dynamische Panel Controls iterieren

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Klaus Holster (msdn_ng_at_klausholster.com)
Date: 10/05/04

  • Next message: Andy Hawk: "Re: URL Rewriting ?"
    Date: Tue, 5 Oct 2004 06:30:52 -0700
    
    

    Hallo Fabian,

    >-----Originalnachricht-----
    >Hallo Klaus,
    >
    >danke für die Antwort!
    >
    >Wie lade ich denn die Controls im PostBack wieder?
    >Muss ich die Objekte komplett neu erstellen oder gibt es
    eine Möglichkeit
    >die Lebensdauer zu erhalten?
    >
    >Fabian
    >
    >

    Die Controls werden immer gleich geladen, egal ob im
    ersten Page.Load oder im Postback, so wie Du das ja schon
    gemacht hast.

    Die Lebensdauer eines Controls ist durch den Page-
    Lifecycle vorgegeben. Man kann ein Control zwar (wie
    jedes andere Objekt auch) in der Session speichern. Das
    widerspricht aber der Architektur von ASP.NET und führt
    höchstwahrscheinlich zu hässlichen Fehlern. Don't do it.

    Hth,

    Klaus


  • Next message: Andy Hawk: "Re: URL Rewriting ?"

    Relevant Pages

    • Re: dynamische Panel Controls iterieren
      ... >Hallo Klaus, ... >Wie lade ich denn die Controls im PostBack wieder? ... Die Controls werden immer gleich geladen, ... Die Lebensdauer eines Controls ist durch den Page- ...
      (microsoft.public.de.german.entwickler.dotnet.asp)
    • Re: Event Handler doesnt fire immediately upon postback?
      ... make its comparisons and work with the PostBack event handlers. ... It seems like such a waste of resources to me sometimes to use controls like ... I still prefer to do as much client-side processing as possible ... the event handler fires immediately. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Event Handler doesnt fire immediately upon postback?
      ... ASP.Net programming model, coming from Classic ASP, which is entirely ... Controls within Controls in the Page, which is, itself, a Control. ... previous state (prior to the PostBack), and only then does the Page (and ... the event handler fires immediately. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: ASP.NET with Datasets
      ... the postbacked viewstate is used to re-create the ... controls are recreated. ... Before or after that you bind the datagrid, you set the dataset in the ... At a postback, you set the session.item back in the dataset, which you (to ...
      (microsoft.public.dotnet.framework.adonet)
    • Re: viewstate = false doesnt work
      ... The viewstate was created to store other ... So IMO your controls are just reinitialized from postback values. ... checkboxs showing their skills. ...
      (microsoft.public.dotnet.framework.aspnet)