How can I make my variable used throughout my application?
<p>How can I get the returned <code>memberID</code> variable inserted back in the other SQL stored proc?</p>

<pre><code>  protected void imgBtnActivate_onClick(object sender, EventArgs e)
{

    // Inserts Member record
    try
    {
        Database db = DatabaseFactory.CreateDatabase(ConfigManager.AppSettings["ConnectionString.Dev"]);

        DbCommand dbCommand = db.GetStoredProcCommand("dbo.ins_member_p");
        db.AddInParameter(dbCommand, "@FirstName", DbType.String, txtFirstName.Text);
        db.AddInParameter(dbCommand, "@LastName", DbType.String, txtLastName.Text);
        db.ExecuteNonQuery(dbCommand);
        int memberID = Convert.ToInt32(db.GetParameterValue(dbCommand, "MemberNewID").ToString());

}
    catch (Exception ex)
    {
        ExceptionPolicy.HandleException(ex, "Notify Policy");
    }


    // Insert Member Email
    try
        {

Database db = DatabaseFactory.CreateDatabase(ConfigManager.AppSettings["ConnectionString.Dev"]);

            DbCommand dbCommand = db.GetStoredProcCommand("[ins_MemberEmail_p]");
            dbCommand.Transaction = dbTran;

            db.AddInParameter(dbCommand, "MemberID", DbType.Int32, memberID);
            db.AddInParameter(dbCommand, "SourceID", DBType.In32, 33);
            db.AddInParameter(dbCommand, "EmailAddress", DbType.String, EncryptedEmailAddress);

    }
    catch (Exception ex)
    {
        ExceptionPolicy.HandleException(ex, "Notify Policy");
    }
}
</code></pre>
