srijeda, 23. rujna 2009.

Bind value in DetailsView Insert Mode

InsertItemTemplate can't bind data directly from asp. Use codebehind.
Example:
DetailsView_Species_DataBound (make shoure that DetailsView call for it)

if (DetailsView_Species.CurrentMode == DetailsViewMode.Insert)
{


Label Find_lblSpecies_Insert = (Label)DetailsView_Species.FindControl("lblSpecies_Insert");

Find_lblSpecies_Insert.Text = "aaaa";

}