Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: MySql DataRow

  1. #1
    New Coder
    Join Date
    Nov 2006
    Posts
    47
    Thanks
    2
    Thanked 1 Time in 1 Post

    Question MySql DataRow

    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!

  • #2
    New Coder
    Join Date
    Nov 2006
    Posts
    47
    Thanks
    2
    Thanked 1 Time in 1 Post
    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.

  • #3
    New Coder
    Join Date
    Nov 2006
    Posts
    47
    Thanks
    2
    Thanked 1 Time in 1 Post
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •