The syntax is
<%# Eval("...") %>
You could do something like
<asp:ImageButton Visible="<%# ShowImg(Eval(Container.DataItem,"Message")) %>" />
and in your codebehind:
boolean ShowImg(string msg)
{
return (msg == HttpContext.Current.Profile.UserName);
}
More Related Contents:
- Repeater in Repeater
- How to find controls in a repeater header or footer
- Understanding ASP.NET Eval() and Bind()
- How to do AsyncPostBackTrigger for the LinkButton in the Repeater
- I just discovered why all ASP.Net websites are slow, and I am trying to work out what to do about it
- Content-Disposition:What are the differences between “inline” and “attachment”?
- Generating an Excel file in ASP.NET [closed]
- Best way to trim strings after data entry. Should I create a custom model binder?
- How can I manually create a authentication cookie instead of the default method?
- System.Security.SecurityException when writing to Event Log
- Enable ASP.NET ASMX web service for HTTP POST / GET requests
- What perfmon counters are useful for identifying ASP.NET bottlenecks?
- Visual Studio error “Object reference not set to an instance of an object” after install of ASP.NET and Web Tools 2015
- Setting up redirect in web.config file
- How to run ‘dotnet dev-certs https –trust’?
- How to remove returnurl from url?
- Why does the 2nd T-SQL query run much faster than the first when called by Reporting Services 2005 in a web-app
- What are the pros and cons of running IIS as 32bit vs 64bit on a 64bit OS?
- Allow anonymous authentication for a single folder in web.config?
- how to access master page control from content page
- Page_ClientValidate is validating multiple times.
- Conditionally hide CommandField or ButtonField in Gridview
- Streaming large file uploads to ASP.NET MVC
- set cookie to expire at end of session? asp.net
- Using a Razor @functions in several webpages (.cshtml files)
- Requests hanging on Session module on IIS 7.5
- Proper way to use JQuery when using MasterPages in ASP.NET?
- What is a Generic Handler in asp.net and its use?
- How does Html.Raw MVC helper work?