Reputation: 73928
I have a DetailsView which I use to edit some Fields. In my code belove I try to - Find the TextBox where User has left inout - Sanitize using my own class the data inserted Till now all is working just fine.
My questions is how to SAVE this data in the underlying Data Source using DetailsView? Thanks for now!
protected void uxAuthorListDetailsView_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
{
// Find out Controlls
TextBox myContentAuthor = (TextBox)uxAuthorListDetailsView.FindControl("uxContentAuthorInput");
myContentAuthor.Text = UserInputSanitizer.CapitalizeFirstLetterTrim(myContentAuthor.Text);
}
Upvotes: 0
Views: 221
Reputation: 385
Altering the contents of the textbox like this will make the Update command read the new values.
did you try to call the datasource.Update method?
Upvotes: 1