Click here to Skip to main content
15,669,603 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
i got a error like this

An exception of type 'System.NullReferenceException' occurred in App_Web_ke2os3ar.dll but was not handled in user code

Additional information: Object reference not set to an instance of an object.


<asp:Label ID="lblOffername" runat="server"
Text='<%#Eval("OfferName") %'><asp:Label>

<asp:Label ID="lblOffername" runat="server" Text='<%# Eval("OfferName") %>'>

this is right way to pass your value
Share this answer
You specified Text in wrong format try like following

Text='<%# Eval("OfferName") %>'

Share this answer
You can set your Text in below Particular Format

<asp:Label ID="lblOffername" runat="server"
Text='<%# Eval("OfferName") %'><asp:Label>
Share this answer
<asp:label id="lblOfferName" runat="server" text="'<%# (" offername=")%>'/></xml>" xmlns:asp="#unknown">
Share this answer

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