Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP.Net textboxes
Message
 
À
04/03/2002 16:59:03
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00628101
Message ID:
00628167
Vues:
21
>All,
>
> I have a webform that retreives data from a database and fills a textbox with data when the page is loaded. If I change the text in the textbox and click a submit button which updates the database, the value of the textbox doesn't have the changes I made in it. The datatype for the textbox on the SQL Server is text. What's wrong?

What does your Page Load event look like? Make sure you are checking the status of IsPostBack to make sure you are not overwriting the changed value.
void Page_Load() {
    if (!IsPostBack) 
      {
        // Populate your controls from the database
      }
    else
      {
       // Save the state of your control to database
      }
}
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform