I am receiving this error when I try to load this page. I have tried several times to resolve it but nothing I have tried has worked. Below is the page I am having the error with:

<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource2" DataKeyField="QuizId">
     <ItemTemplate> Title:
     <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# "/Pages/start.aspx?testID=" + Eval("QuizID")%>' Text='<%# Eval("Title") %>'></asp:HyperLink>
      <br />
      <br />
      <br />
 <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:UniConnectionString %>" SelectCommand="SELECT [Title], [QuizId] FROM [Quiz]"></asp:SqlDataSource>
 <br />
  History of Results:<br />
  <br />
  <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
 <asp:BoundField DataField="QuizID" HeaderText="Quiz" SortExpression="QuizID" />
 <asp:BoundField DataField="DataTimeComplete" HeaderText="Completed" SortExpression="DataTimeComplete" />
 <asp:BoundField DataField="CorrectAnswerCount" HeaderText="Score" SortExpression="CorrectAnswerCount" />
<br />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:UniConnectionString %>" SelectCommand="SELECT Quiz.Title, UserQuiz.DateTimeComplete, UserQuiz.Score FROM UserQuiz INNER JOIN Quiz ON UserQuiz.QuizID =Quiz.QuizID WHERE (UserQuiz.UserName = @UserName)ORDER BY UserQuiz.DateTimeComplete">
  <asp:Parameter Name="UserName" />

The line of code that is being highlighted is

<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# "/Pages/start.aspx?testID=" + Eval("QuizID")%>' Text='<%# Eval("Title") %>'></asp:HyperLink>.

This error also appeared Additional information: Conversion from string to type 'Double' is not valid.

Any suggestions as to how I can resolve this issue would be greatly appreciated. Thanks in advance.

Related posts

Recent Viewed