1
Answer

How to Pass Eval value to if statement in aspx page?

Raja

Raja

8y
423
1
if (Request.QueryString["SelectValue"].ToString() == "Cache" && Eval("LOADIND").ToString().Trim() == "EF")
{ %>
<a href="../Home/AddMaterialDraft.aspx?Spirid=<%# Eval("ID") %>&project= <%# Eval("NAME") %>">
<img src="../Images/change.png" style="height: 30px; width: 30px" /></a>
<% } %>
Above code is used in my aspx page. first condition value coming from session so no problem is occured but the second condition is value from datatable in if statement.now i run my code below error is occur  :

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

How to fix this.the if statement is inside the repeater. 
Answers (1)
0
Mahesh Chand

Mahesh Chand

1 286.4k 123.7m 13y
If you are having same problem with Yahoo also, it must be your Internet is very slow. We are working on a lighter version of the site that will be launched by Jan 01.
Accepted
0
Karthik Agarwal

Karthik Agarwal

NA 873 238.8k 13y
@Mahesh: No mahesh i can't doubt my internet connection as it's doing pretty well. My internet connection speed is 2Mbps. I am able to see videos without any buffering. May be i need to wait till you launch lighter version i guess if there isn't any solution for this. Why i can't doubt my internet connection is, previously i was with some other service provider as i shifted to some other house along with that i changed my service provider as well but the problem still exits.

@Sam: I opted for 4Mbps connection but when I checked it using Mcafee speedometer it was past 1Mbps. I doubt that is the not the problem with speed, there is something else happening. I will try calling tech support of my service provider.
0
Sam Hobbs

Sam Hobbs

NA 28.7k 1.3m 13y
Do you know how fast your connection is? There are many ways to test connection speed. One of them is the DSLReports.com Speed Test but there are vary many others.