How can I check if the form view is empty from code? I've tried DataItemCount == 0 but it doesn't work. Thanks to
if (FormView_imgBG.DataItemCount == 0) { //do stuff } else { // do other stuff }
People say that the best place to check the DataItemCount property is in the FormView.DataBound event.
protected void FormView1_DataBound(object sender, EventArgs e) { if (FormView1.DataItemCount == 0) { } else { } }