Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detailsview - how to clear fields?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01292282
Message ID:
01293618
Vues:
14
>>>I found it (for my situation anyway).
>>>
>>>In the ItemInserted method of the detailsview (I use hook all to the same method), I put..
>>>me.databind() ' to bind to fresh data
>>>me.clearchildstate() ' to make sure the viewstate doesn't repopulate
>>>
>>>It works! Much easier than other possible solutions I saw during google searches..
>>
>>Would it be the best solution? And what would be C# version - this. instead or me ?
>>
>>I'm not sure I currently have ItemInserted method, need to check.
>>
>>Also how can I get to this method?
>
>This code doesn't seem to be working for me for some reason.
>
>Also I'm using a Wizard with multiple steps. Would it be OK to put your code in the Finish button instead of Item_Inserted?
>
>protected void wzrdAddEvent_FinishButtonClick(object sender, WizardNavigationEventArgs e)
>        {
>            if (this.rdblEventType.SelectedValue == "1")
>            {
>                InsertPorgram();
>                this.lblInfo.Text = "Recurring Program " + this.txtbName.Text + " was added";
>            }
>            else
>            {
>                InsertEvent();
>                //NN 12/31/07 changed case to lower in was
>                this.lblInfo.Text = this.txtbName.Text + " was added as a one time event";
>            }
>        }
My code needs to be run in a method of the detailsview object - the methods I call are not visible outside of the objects' methods. See my original message with the code - I tell you the method I put the code in (I can't see it from this message). And yes - you would use This instead of Me. Intellisense will show the methods I am using if you are within a method of the detailsview.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform