Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
36004 Points
7901 Posts
Aug 05, 2009 09:14 PM|LINK
1. Why do you need to set InsertCommand and InsertParameters in code - would it be much simpler to set them in ASPX instead?
The way you're doing it makes the whole SQLDataSource sort of useless - you can do the same with direct ADO.NET code (as shown in the
http://www.aspsnippets.com/post/2009/05/27/Get-ID-of-the-newly-inserted-record-in-SQL-Server-using-ADONet.aspx )
Naom
All-Star
36004 Points
7901 Posts
Re: Populating Session Var in STORED PROC or POSTBACK - HELP please!!
Aug 05, 2009 09:14 PM|LINK
1. Why do you need to set InsertCommand and InsertParameters in code - would it be much simpler to set them in ASPX instead?
The way you're doing it makes the whole SQLDataSource sort of useless - you can do the same with direct ADO.NET code (as shown in the
http://www.aspsnippets.com/post/2009/05/27/Get-ID-of-the-newly-inserted-record-in-SQL-Server-using-ADONet.aspx )
(Donald Knuth)
Visit my blog
Microsoft Community Contributor 2011-12