View Full Version : MySql DataRow

03-15-2007, 04:13 PM
Hello All.

I hope I'm posting this to the right forum. If not, please advise. I think this problem is related to mysql. I have a MySql database. In my program I am using a asp.net repeater. I am nesting two repeaters. The code works fine until it gets to the second repeater. Then I get the following error:

'DataRow' is a type in 'Data' and cannot be used as an expression.

I believe it is because I am using MySql.Data in my codebehind but on the aspx page i import the System.Data namespace. Does anyone knowwhat the equivalent would be using the Mysql.Data namespace. Here is the line that generates the error:

<%# ((System.Data.DataRow)Container.DataItem)["FileString"] %>

Any suggestions would be greatly appreciated. Thanks!

03-15-2007, 05:36 PM
This was moved to ASP, but I am using ASP.NET. Can an admin please move it to ASP.NET forum. Thanks. I wasn't sure where to put it so thanks for your help.

03-15-2007, 11:37 PM
I fixed my own problem with the following replacement in the item template:

<%="<a href=" & chr(34) & "javascript:PopIt(" & chr(39) &
"java/ipix/ipix-viewer.aspx?FileString="%><%#Container.DataItem(2)%><%=chr(39) & ", 375, 350)" & chr(34)%> class="more"><%# Container.DataItem(1)%></a>

Thanks to those who took a look and tried.