.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

My View of a JIRA Workflow for Web Development 17th April, 2018

How To Solve: SQL Server detected a logical consistency-based I/O error: invalid protection option. 19th March, 2018

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