Problem in using begin trans in c# code
                            
                         
                        
                     
                 
                
                    I am Using Begin trans in c# code
here is the case 
begin trans
insert in table1
now here is the problem now i have to select the id inserted in above query
but i hvnt commit so the second qry wasnt executed
third qry is to insert in table2 using the id 
commit tran
pls tell me solution