VoteList2.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Party.Ui;
using SubSonic;
using System.Data; public partial class V2VOTE_VoteList2 : System.Web.UI.Page
{ public DataTable B;
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
} protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindView();
}
} private void BindView()
{
Select sel = new Select("ID", "Name");
sel.From("Vote").Where("isclosed").IsEqualTo(false);
B = sel.ExecuteDataSet().Tables[];
}
}

VoteList2.aspx:

<%@ Page Language="C#" AutoEventWireup="true"   CodeFile="VoteList2.aspx.cs" Inherits="V2VOTE_VoteList2" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title> </head>
<body> <form id="form1" runat="server"> <div style="margin: 0px 0px 0px 0px"> <table cellpadding="" cellspacing=""> <%
int Count = B.Rows.Count;
  for (int i = ; i < Count; i++)
{
 %>
<tr class="odd" >
<td><a style="text-decoration: none;" href='Vote.aspx?id=<%=B.Rows[i]["id"] %>'>
<%=B.Rows[i][].ToString() %> </a></td>
</tr>
  <%
}
  %>
</table>
</div>
</form>
</body>
</html>
04-25 04:47