Solved

ASP.net Details View visability property

Posted on 2012-04-10
2
296 Views
Last Modified: 2012-04-12
I have this code in a Details view on my page.

<asp:BoundField DataField="txt_BUS_EMAIL" HeaderText="txt_BUS_EMAIL" SortExpression="txt_BUS_EMAIL" Visible='<%# Eval("txt_BUS_EMAIL").ToString().Equals() %>' />

When I go to run it, I get his error:

Databinding expressions are only supported on objects that have a DataBinding event. System.Web.UI.WebControls.BoundField does not have a DataBinding event.

Please advise if any of you have encountered this before!

Thank you in advance!
0
Comment
Question by:us1975mc
2 Comments
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 500 total points
ID: 37829975
i would suggest two things here:

1. use a template field
2. make a method GetStatus in your code behind that returns true or false, call it in template field as <%#GetStatus()%>

also refer here for help:-
http://www.asp.net/web-forms/tutorials/data-access/custom-formatting/using-templatefields-in-the-detailsview-control-cs
0
 

Author Closing Comment

by:us1975mc
ID: 37837437
Thanks for the help!
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.Net Report Printing Issue 3 33
vb.net help 4 29
Write to a printer using vb.net 9 26
VB.Net WebRequest Code from JSON curl 9 11
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question