title: How to store Id (primary key) of newly inserted row into a variable using C#
body: <p>I am trying to get the Id of newly inserted row as below,  </p>
  
  <pre><code>INSERT dbo.Users(Username)  
  OUTPUT inserted.ID  
  VALUES('my new name');
  </code></pre>
  
  <p>and when I execute this query in SQL Server 2008, it returns the <code>id</code>. My question is how to store this <code>Id</code> in a variable in asp.net C# to use this value further.  </p>
  
  <p>Note: I am not using parametrized query. </p>