How to show a particular record in DetailsView?
I have a DetailsView
control which is bind to a ObjectDataSource
. In my application there is a TextBox
, user enter ID in this textbox and clicks SHOW RECORD button, now DetailsView should show that record.
Maybe something like this?
_dataSet.Filter = String.Format("id = {0}", _textBox.Text);
_detailsView.DataSource = _dataSet;
_detailsView.DataBind();
精彩评论