Sql Server return the value of identity column after insert statement
send an output parameter like
@newId int output
at the end use
select @newId = Scope_Identity()
return @newId
SELECT SCOPE_IDENTITY()
after the insert statement
Please refer the following links
http://msdn.microsoft.com/en-us/library/ms190315.aspx
Insert into TBL (Name, UserName, Password) Output Inserted.IdentityColumnName
Values ('example', 'example', 'example')