Greetings all,
I am in the process of building a new site for my company (in DNN 6), and I need to have somewhere around 20 pages display a couple of modules (std. HTML ones as of now) that will have information from a table look roughly like this, in paragraph form:
[Report Name]
[date] [Abstract text- two sentences or so]
[link 1] [link 2] [link3] [link 4]
[Next Record, same layout]
And so on... My question then, is this: the developer who built the current site (Apache, MYSQL) is helping me with this, and we're having trouble figuring out where in the DNN file structure the C# should go to make this work. He's written this (which works outside of DNN, in .Net 3.5):
<script runat="server">
void Page_Load(Object sender, EventArgs e)
{
System.Data.DataView dvSql = (System.Data.DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
foreach (System.Data.DataRowView drvSql in dvSql)
{
HyperLink hyperlink1 = new HyperLink();
Label label = new Label();
hyperlink1.Text = drvSql["ReportTitle"].ToString() + ", " + drvSql["Release_Date"] + "<br/>" + drvSql["AbstractText"] + "<br/>";
hyperlink1.NavigateUrl = drvSql["pdfLink"].ToString();
PlaceHolder1.Controls.Add(hyperlink1);
}
}
</script>
<asp:Panel ID="PlaceHolder1" runat="server">
</asp:Panel>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:dbnameConnectionString %>"
SelectCommand="SELECT * FROM [tblResearch]"></asp:SqlDataSource>
So anyone who might have an idea of how to make this work, I'd really appreciate the help. Happy to share the build site if you need to see the dummy text to see how it needs to look.
Thanks
Chris