title: How To Insert Data Within Two Tables
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2391851/how-to-insert-data-using-multiple-tables">how to insert data using multiple tables</a>  </p>
  </blockquote>
  
  
  
  <p>What i Have Done is Create two Tables</p>
  
  <ol>
  <li>Table1 - RollNo,Fname,Mname,Lname</li>
  <li>Table2 - Rollno,Marks</li>
  </ol>
  
  <p>Now I have Set the Foreign Key as RollNo</p>
  
  <p>Now the Point is :-</p>
  
  <p>I have used the DetailsView in ASP.NET in Default mode as Insert</p>
  
  <p>In the Data Source Config I Have Written the query for SELECT as the INNER JOIN of the Two Tables<br>
  This is Perfect.</p>
  
  <p>The PROBLEM IS WITH THE INSERT QUERY.It does not allow me to Insert values into Two Tables</p>
  
  <p>From the Above it is Clear that for my INSERT operation Fname,Mname,Lname is from Table1 and Marks is Table2.And Rollno is foreign Key.So How do I do This</p>
  
  <p>INSERT INTO TWO TABLES.FROM a Single User Form</p>
  
  <p>Keep In Mind Guys I Am using DetailsView in Asp.NET which allows me select only one SQLDataSource at a time..</p>