我想从ASP.NET中的表中获取外键数据

时间:2019-05-18 09:55:08

标签: asp.net

enter image description here

我想在单个视图中代表外键从表中获取数据。我创建了一个表来存储标题,并且创建了另一个表来存储sub_headings。我用外键创建了一个关系。知道我想从这些表中获取数据。我已经将数据存储在数据库中-如何检索它?

<div class=" col-md-4">
<div class="other-feature-item">
   This part I need from heading table
       <h4>heading</h4>

   This part I need from sub_heading table with above heading _id

   <ul style="list-style-type:circle;margin-left: 15px">
   <li>sub_heading1</li>
   <li>sub_heading2</li>
   </ul>
</div>
</div>

enter image description here

1 个答案:

答案 0 :(得分:0)