.NET Daily

Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

Introduction

Darius

Darius

Darius Dumitrescu is a creative Senior CMS Consultant with in depth .NET knowledge, focused on Web Development and Architecture Design.


LATEST POSTS

Tips for Effective IT Projects Estimates 23rd December, 2017

Tips about Project Status Reports 05th October, 2017

Common .NET Exceptions

Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

Posted on .

Error: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

Scenario1: You have created a repeater or gridview that looks like this:

Scenario1: Please pay attention at the server tags format <%= Eval("FirstName") %>

Resolution 1 of Scenario 1: Try to format the server tag like this: <%#Eval("FirstName")%> ;
Resolution 2 of Scenario 1: If you are using as DataSource other provider that SQL, also try a server tag format that looks like this: <%#DataBinder.Eval(Container.DataItem,"field")%>;

Darius

Darius

Darius Dumitrescu is a creative Senior CMS Consultant with in depth .NET knowledge, focused on Web Development and Architecture Design.

There are no comments.

View Comments (0) ...
Navigation