|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
newrow ID with detailsview and objectdatasourceI've a problem inserting a new row using a detailsview and an
objectdatasource. I've defined the objectDatasource and it is using well a custom object to insert the new item on db. All works fine, but now I need to get the ID of the inserted row (the ID is an autoincrement value assigned by db, or can be defined by my BLL) when the operation is completed. I can read this value in my "SelectMethod" routine, but I dont' know hot to export this value to calling objectdatasource, and then to calling web form. How can I make this? thanks In this demo, the BLL function that does the record insert returns the record
ID of the inserted record, which I can retrieve in the webform during handling the Inserted event of the ObjectDataSource: http://www.webswapp.com/codesamples/aspnet20/dependentlists/default.aspx Show quoteHide quote "Trapulo" wrote: > I've a problem inserting a new row using a detailsview and an > objectdatasource. > > I've defined the objectDatasource and it is using well a custom object to > insert the new item on db. All works fine, but now I need to get the ID of > the inserted row (the ID is an autoincrement value assigned by db, or can be > defined by my BLL) when the operation is completed. I can read this value in > my "SelectMethod" routine, but I dont' know hot to export this value to > calling objectdatasource, and then to calling web form. How can I make this? > > thanks > > > > > > > Thankyou
I was looking for something in detailview.inserted, not in objectdatasource.inserted. Show quoteHide quote "Phillip Williams" <WEBSWAPP@newsgroups.nospam> wrote in message news:11D3B787-F1AD-472F-8E44-629955F32509@microsoft.com... > In this demo, the BLL function that does the record insert returns the > record > ID of the inserted record, which I can retrieve in the webform during > handling the Inserted event of the ObjectDataSource: > http://www.webswapp.com/codesamples/aspnet20/dependentlists/default.aspx > > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "Trapulo" wrote: > >> I've a problem inserting a new row using a detailsview and an >> objectdatasource. >> >> I've defined the objectDatasource and it is using well a custom object to >> insert the new item on db. All works fine, but now I need to get the ID >> of >> the inserted row (the ID is an autoincrement value assigned by db, or can >> be >> defined by my BLL) when the operation is completed. I can read this value >> in >> my "SelectMethod" routine, but I dont' know hot to export this value to >> calling objectdatasource, and then to calling web form. How can I make >> this? >> >> thanks >> >> >> >> >> >> >>
ASP.NET 2.0 Easier than ASP? Gimmie a Break!
GridView and XmlDataSource TabStrip - create tabs dynamicly on client-side DropDownList and Spaces Trouble removing cookies Trouble with DataList Control Trouble with the DataList Control GridView DataFormatString only works on Integers hyperlink in a Calendar Control ASP.Net 2.0 Table not expanding 100% |
|||||||||||||||||||||||