If koder med database
Hej.Hvordan får jeg denne kode til at virke:
Line 14: <% if(Eval("Godkendt") == "Ja"){ %><img src="Grafik/GodKendt.gif" width="98" height="98" />
Line 15: <% }else{ %><img src="Grafik/Afvist.gif" width="98" height="98" />
Line 16: <% } %></td>
Den siger:
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.