Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I still don't figure out why are you fighting against asp.net, but you can do what you want using <em>ObjectDataSource</em>. The <em>ObjectDataSource</em> control uses reflection to call methods of a business object to select, update, insert, and delete data. You set the <em>ObjectDataSource</em> control's <em>TypeName</em> property to specify the name of the class to use as a source object.</p> <p>Working with <em>ObjectDataSource</em> resume to do things like:</p> <p><strong>To Declare it:</strong></p> <pre><code>&lt;asp:objectdatasource runat="server" id="ObjectDataSource1" typename="EmployeeLogic" selectmethod="GetAllEmployees" updatemethod="UpdateEmployeeInfo" dataobjecttypename="NorthwindEmployee" /&gt; </code></pre> <p><strong>To Create Methods into code-behind:</strong></p> <pre><code>public List&lt;NorthwindEmployee&gt;GetAllEmployees() { //your code here } public void UpdateEmployeeInfo(NorthwindEmployee emp) { //your code here } </code></pre> <p>to Configure the GridView and to be happy :)</p> <p>Below I've provided some links that might help you:</p> <p><a href="http://www.manuelabadia.com/blog/PermaLink,guid,c72852ae-1fdd-4934-a715-f565ceaf21cc.aspx" rel="nofollow noreferrer">http://www.manuelabadia.com/blog/PermaLink,guid,c72852ae-1fdd-4934-a715-f565ceaf21cc.aspx</a></p> <p><a href="http://msdn.microsoft.com/en-us/library/57hkzhy5.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/57hkzhy5.aspx</a></p> <p><a href="http://www.google.com.br/search?hl=en-us&amp;q=objectdatasource+asp.net" rel="nofollow noreferrer">http://www.google.com.br/search?hl=en-us&amp;q=objectdatasource+asp.net</a></p>
 

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