Just make the following changes in stored proc.
Add select @@identity
Instead of this,
Declare @NewId as int
select @NewId= @@IDENTITY
END
now ur code will look like
Select @@Identity
END
Now in aspx page when executing command.
SqlCommand cmd = new SqlCommand();
CommandText = "StoredProcedureName";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection = sqlConnection1;
sqlConnection1.Open();
int ID=(Int32)cmd.ExecuteScalar();
sqlConnection1.Close();