.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Code Snippets >> ASP.NET Controls >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets


Posted By:Rajshree       Posted Date: September 22, 2010    Points: 10    Category: ASP.NET Controls    URL: http://www.dotnetspark.com  

It evaluates data-binding expressions at run time and formats the result as a string.We use Databinder.Eval basically with repeater dataitem binding or with datagrid ,GridView etc....

public static string Eval(
	Object container,
	string expression,
	string format

This is the method having 3 parameters

Type: System.Object
The object reference against which the expression is evaluated. This must be a valid object identifier in the page's specified language.
Type: System.String
The navigation path from the container object to the public property value to be placed in the bound control property. This must be a string of property or field names separated by periods, such as Tables[0].DefaultView.[0].Price in C# or Tables(0).DefaultView.(0).Price in Visual Basic.
Type: System.String
A .NET Framework format string (like those used by String.Format) that converts the Object instance returned by the data-binding expression to a String object.


Further Readings:


    No response found. Be the first to respond this post

    Post Comment

    You must Sign In To post reply
    Find More code samples in C#, ASP.Net, Vb.Net and more Here

    Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend