Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MmTextBox reverts back to zero
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
MmTextBox reverts back to zero
Divers
Thread ID:
01296241
Message ID:
01296241
Vues:
50
All,

I have an mmTextBox placed on a web form and have bound it to a business object column using the bindingsource and bindingsourcemember properties. I also have a button next to this control with the following event code:
// Create a new trader profit record 
        TraderprofitDefaults TPD = new TraderprofitDefaults(this.profitID, Convert.ToInt32(this.cboTrader.SelectedValue));
        this.oTraderProfit.NewEntity(TPD);        
        if (mmSaveDataResult.RulesPassed == this.oTraderProfit.SaveEntity())
        {
            string nextScreen = "ProfitEditForm.aspx?profitID=" + this.profitID.ToString();
            mmMessageDisplay.DisplayMessage("System Confirmation", "Trader Allocation Record Successfully Saved",
                nextScreen, 3);
        }
The code is to add a new row into the trader profit table. This table has three columns. The two referenced above as default values and the third the value in the mmTextBox that is entered by the user (before the button is clicked to add the row).

My problem is that the value entered in the text box is lost each time I click the button as it reverts back to zero. Can anyone help me to explain what is happening here?

Thanks in advance.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform