jrb47 0 Newbie Poster

I have a file that I can get to show correctly in grid/web - however I need to be able to download a CSV. I do not usually work in asp so out on a limb with a deadline here!

<%@ Import Namespace ="System.Data" %>
<%@ Import Namespace="System.Data.OleDB" %>
<script language="vb" runat ="server">
sub Page_Load()
        Dim strconnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;"
        strconnection += "Data Source = Teens.mdb"
        Dim strSQL As String = "SELECT * FROM teens"
        Dim objdataset As New DataSet
        Dim objconnection As New OleDbConnection(strconnection)
        Dim objadapter As New OleDbDataAdapter(strSQL, objconnection)
        objadapter.Fill(objdataset, "teens")
        Dim objdataview As New DataView(objdataset.Tables("teens"))
        nwdat.DataSource = objdataview
        nwdat.databind()
end sub
</script>
<html>
<body>
<h2>Teens Return</h2>
<asp:datagrid id="nwdat" runat = "server"/>
<br />
</body>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.