K
kamlesh
Hi Experts,
I have a question on the ASP.NET 2.0 Details view control
I dont like using the SQLDataSource to bind the data to the
DetailsView control..
I dont like the idea of placing Queries in the .ASPX files...I
prefer a 3 tiered approach to development.
Am using a Custom object to bind the object to the Details View
control at run time..
When the page loads....like this
BO.TestBO bo = new BO.TestBO();
CustomObject object = bo.GetProfileInformation(1);
this.personalInfoDetailsView.AllowPaging = false;
this.interestInfoDetailsView.AllowPaging = false;
this.personalInfoDetailsView.DataSource = object;
this.personalInfoDetailsView.DataBind();
I've been trying to figure out how the client of a DetailsView should
handle the ItemUpdating event when setting the datasource
programatically.
All the examples i've come across show a declerative data source being
used. Do i need to use ObjectDataSource?
The DetailViewUpdateEventArgs always has the OldValues and NewValues
collection empty.(Keys is too).
I can't seem to get the edited values.
I can use template fields and extract the value like this in the
'ItemUpdating' event handler
TextBox tempText = personalInfoDetailsView.FindControl("txtName") as
TextBox;
if (tempText != null)
{
info.Name = tempText.Text.Trim();
}
But extracting the values like this in the 'ItemUpdating' event
handler tooo does not work..
I dont get the edited values...i get the old values...
Any ideas would be appreciated.
Thanx,
Kamlesh,
I have a question on the ASP.NET 2.0 Details view control
I dont like using the SQLDataSource to bind the data to the
DetailsView control..
I dont like the idea of placing Queries in the .ASPX files...I
prefer a 3 tiered approach to development.
Am using a Custom object to bind the object to the Details View
control at run time..
When the page loads....like this
BO.TestBO bo = new BO.TestBO();
CustomObject object = bo.GetProfileInformation(1);
this.personalInfoDetailsView.AllowPaging = false;
this.interestInfoDetailsView.AllowPaging = false;
this.personalInfoDetailsView.DataSource = object;
this.personalInfoDetailsView.DataBind();
I've been trying to figure out how the client of a DetailsView should
handle the ItemUpdating event when setting the datasource
programatically.
All the examples i've come across show a declerative data source being
used. Do i need to use ObjectDataSource?
The DetailViewUpdateEventArgs always has the OldValues and NewValues
collection empty.(Keys is too).
I can't seem to get the edited values.
I can use template fields and extract the value like this in the
'ItemUpdating' event handler
TextBox tempText = personalInfoDetailsView.FindControl("txtName") as
TextBox;
if (tempText != null)
{
info.Name = tempText.Text.Trim();
}
But extracting the values like this in the 'ItemUpdating' event
handler tooo does not work..
I dont get the edited values...i get the old values...
Any ideas would be appreciated.
Thanx,
Kamlesh,