TransactionId Not working Second Time in NBitcoin and QBitNinja? I am trying to send bitcon from my address to another address. i had 0.0024BTC in my wallet and then i performed a transfer using this article:
https://programmingblockchain.gitbook.io/programmingblockchain/bitcoin_transfer/spend_your_coin#sign-your-transaction
The Transfer was success. I was happy. Now i again tried to perform another transaction. Since i still have unspent amount in that transactionId so i used the same TransactionId this time as well. I got success response along with hash in the code but when i went to explorer i cannot find another transaction there is only one transaction. Should i use different transactionId or is this anything i missed. Please help !
Thanks in advance
Since i still have unspent amount in that transactionId so i used the same TransactionId this time as well.

This is incorrect. You cannot use the same transaction ID. You have to use the new transaction ID to spend new UTXO. The input was also used as change address in the transaction so you have a new UTXO associated with the same address. I will share one example below:
I create a new address in Bitcoin Core with getnewaddress command: tb1q8flc50kum4jwfvfc4vzqrd5e7kdmc8nm85vwwj
I send 0.01 testnet BTC to it from my Electrum Wallet in transaction: 9a1eab961a8421a4ac35da09de7870f573640a02f872f61de254f6345ed21532
There is only one UTXO (Unspent Transaction Output) associated with address tb1q8flc50kum4jwfvfc4vzqrd5e7kdmc8nm85vwwj right now.
I can use this transaction ID to create a new transaction in which I try to spend this 0.0005 BTC from 0.01 BTC I received.
I create a new transaction to send 0.0005 BTC to a random address with createrawtransaction command:
createrawtransaction &quot;[{\&quot;txid\&quot;:\&quot;9a1eab961a8421a4ac35da09de7870f573640a02f872f61de254f6345ed21532\&quot;,\&quot;vout\&quot;:1}]&quot; &quot;[{\&quot;tb1q03dvss952khelxea5tpjwf6upv8fshnk95sj6y\&quot;:0.0005}]&quot;

I add change address in it to receive (0.01-0.0005-Tx_Fee) and use the same address associated with the UTXO being spent (Although a new address should be used for change):
fundrawtransaction &quot;02000000013215d25e34f654e21df672f8020a6473f57078de09da35aca421841a96ab1e9a0100000000ffffffff0150c30000000000001600147c5ac840b455af9f9b3da2c327275c0b0e985e7600000000&quot; '{&quot;changeAddress&quot; : &quot;tb1q8flc50kum4jwfvfc4vzqrd5e7kdmc8nm85vwwj&quot;}'

Sign the transaction:
signrawtransactionwithwallet 02000000013215d25e34f654e21df672f8020a6473f57078de09da35aca421841a96ab1e9a0100000000ffffffff02637e0e00000000001600143a7f8a3edcdd64e4b138ab0401b699f59bbc1e7b50c30000000000001600147c5ac840b455af9f9b3da2c327275c0b0e985e7600000000

Broadcast the transaction:
sendrawtransaction 020000000001013215d25e34f654e21df672f8020a6473f57078de09da35aca421841a96ab1e9a0100000000ffffffff02637e0e00000000001600143a7f8a3edcdd64e4b138ab0401b699f59bbc1e7b50c30000000000001600147c5ac840b455af9f9b3da2c327275c0b0e985e760247304402203dffb9e827b95ab91cb1b42df88629b0a9222c64d277596707ec97b78392cf4b02205390bc9844e157fa9c3c8dbcce69c71c0db84af9cbdb79811ca0b8f68562bff4012102bdce2c0d9dd8337d0d18dafe145848406eaee5d024382dcae086e52868d86d7200000000

I understand the steps are not exactly the same as used in NBitcoin but the basic concepts of creating, signing and broadcasting transactions remains the same.
Let me share a rough diagram to show the things I did above:

Tx1: https://tbtc.bitaps.com/9a1eab961a8421a4ac35da09de7870f573640a02f872f61de254f6345ed21532/tb1q8flc50kum4jwfvfc4vzqrd5e7kdmc8nm85vwwj
Tx2: https://tbtc.bitaps.com/399375484659b8b1015edd752afa2ef3765adc331e8439acf14c017716d4b842/tb1q8flc50kum4jwfvfc4vzqrd5e7kdmc8nm85vwwj
We used Tx1 to spend UTXO which cannot be done twice. We received more BTC in Tx2 which can be spent using Tx2. An address can have many UTXOs associated with it.