Click here to Skip to main content
15,909,747 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
I am getting compile tym error that fval function not exit in current context.



XML
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:DataList ID="DataList1" runat="server">
        <ItemTemplate>
            <table>
                <tr>
                    <td>
                        <img src ="<%#fval("image1") %>" height ="100" width ="100" />
                         <img src ="<%#fval("image1") %>" height ="100" width ="100" />

                    </td>
                </tr>
            </table>
        </ItemTemplate>
    </asp:DataList>


    </div>
    </form>
</body>
</html>
Posted
Comments
Sergey Alexandrovich Kryukov 28-Mar-15 1:15am    
And what have you done for this function to exist? It just does not exist, what can be unclear?
—SA
[no name] 28-Mar-15 1:16am    
Eval is the proper tag..
Manoj K Bhoir 28-Mar-15 1:22am    
Where is fval?????

1 solution

Write like this..

HTML
<img src='<%# Eval("image1") %>' height="100" width="100" />
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900