Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As stated earlier using MVC would be a nice approach but u will have to learn a bit to use it. As per the current scenario you can use repeaters which are exactly designed for what you want to accomplish.</p> <p>assuming your database looks something similar to this..</p> <pre><code>id int primary key name nvarchar(50) </code></pre> <p>etc... //suppose you have your database data in <code>"dataFromDatabase"</code> now in your asp.net page just define a repeater like this</p> <pre><code>&lt;div id="content"&gt; &lt;asp:repeater id="repeaterData" runat="server"&gt; &lt;HeaderTemplate&gt; &lt;Table&gt; &lt;tr&gt; &lt;th&gt;Id:&lt;/th&gt; &lt;th&gt;Name : &lt;/th&gt; &lt;/tr&gt; &lt;/HeaderTemplate&gt; &lt;ItemTemplate&gt; &lt;td&gt;&lt;%#Eval("id")%&gt;&lt;/td&gt; &lt;td&gt;&lt;%#Eval("name")%&gt;&lt;/td&gt; &lt;/ItemTemplate&gt; &lt;FooterTemplate&gt; &lt;/Table&gt; &lt;/FooterTemplate&gt; &lt;/repeater&gt; &lt;/div&gt; </code></pre> <p>and in your .aspx.cs page</p> <p>bind the repeater with your datasource </p> <pre><code>repeaterData.DataSource = dataFromDatabase repeaterData.DataBind(); </code></pre> <p>thats all you need to do to get it up and running...</p> <p>and using <code>GridView</code> would be even more simpler you just need to drag that from <code>ToolBox</code> to your aspx file and select your data Source visually and violla you are done... no coding required..... although you will have to do some coding for the edit, delete and some fancy stuff...</p> <p>Hope it helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload