1 Replies - 516 Views - Last Post: 02 January 2018 - 10:29 AM

#1 voodoochild   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 02-January 18

Conversion from string "<%" to type 'integer'

Posted 02 January 2018 - 10:14 AM

I'm trying to write my first website in asp.net ( a forum ) and i can't get past the following error message:
Conversion from string "<%" to type 'integer' is not valid
I've tried googling the problem and i probably tried every variation of hyperlinks with parameters i could find.
I don't know on what line the error is however, the error message doesnt tell me .

Here is my code: the following should show a list of threads in a board

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ViewThreads.aspx.vb" Inherits="myForum.ViewThreads" MasterPageFile="~/Site.Master" %>
<%@ Import Namespace="myForum" %>

<asp:Content ID="viewThreadsContent" ContentPlaceHolderID="MainContent" runat="server"> 

<asp:Repeater ID="repThreads" runat="server">
<HeaderTemplate></HeaderTemplate>
<ItemTemplate>
<div class="topic"> 
		<div class="topicicon">
       
		</div>
		<div class="topictitlebar">
      <span class="topictitle"> 
            <asp:HyperLink ID="hlViewPosts" runat="server" NavigateUrl='<%# Eval("thread_id","~/source/ViewPosts.aspx?threadid={0}")%>'> 
            <%# Eval("title") %> </asp:HyperLink>
      </span>
      <span class="topicusername">
            <asp:HyperLink ID="hlShowUser" runat="server" NavigateUrl='<%# Eval("user_id","~/source/showuser.aspx?userid={0}")  %>' ><%# Container.DataItem("username") %>
            </asp:HyperLink>
      </span>
     <span class="topicdate"><%# Container.DataItem("date") %></span>
		
</div>   
</div>
</ItemTemplate>
<FooterTemplate></FooterTemplate>
</asp:Repeater>
<asp:Button ID="btnMakeThread" runat="server" Text="Maak thread" onclick="btnMakeThread_Click"/>
</asp:Content>




Is This A Good Question/Topic? 0
  • +

Replies To: Conversion from string "<%" to type 'integer'

#2 voodoochild   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 02-January 18

Re: Conversion from string "<%" to type 'integer'

Posted 02 January 2018 - 10:29 AM

Nevermind the problem was on another page :P
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1