Hi there,
first time at attempting a querystring in the my page url. i have looked around and cant quite grasp it.
I call the database:
<code>'gets the portfolio
Function getPortfolio() As System.Data.IDataReader
Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=C:\Inetpub\wwwr"& _
"oot\Davejenkins\admin\sitedb.mdb"
Dim dbConnection As System.Data.IDbConnection = New System.Data.OleDb.OleDbConnection(connectionString )
Dim queryString As String = "SELECT [tblDesigns].[DesignId], [tblDesigns].[SiteUrl], [tblDesigns].[SiteShortDe"& _
"sc], [tblDesigns].[SiteThumb], [tblDesigns].[AltTag] FROM [tblDesigns]"
Dim dbCommand As System.Data.IDbCommand = New System.Data.OleDb.OleDbCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection
dbConnection.Open
Dim dataReader As System.Data.IDataReader = dbCommand.ExecuteReader(System.Data.CommandBehavio r.CloseConnection)
Return dataReader
End Function
</code>
And then have a repeater here:
<code>
<asp:Repeater id="RptPortfolio" runat="server">
<ItemTemplate>
<img align="right" src='<%# Container.DataItem("SiteThumb") %>' alt='<%# Container.DataItem("AltTag") %>'>
Name: <a href="designs.aspx?DesignId='<%# Container.DataItem("DesignId") %>'"><%# Container.DataItem("SiteUrl") %></a>
<br />
Description: <%# Container.DataItem("SiteShortDesc") %> [<a href="designs.aspx?DesignId="& recordset=("DesignId") &">More...</a>]
</ItemTemplate>
</asp:Repeater>
</code>
The bit in red is where it goes wrong presently nothing in DesignId If it make it " " i still dont get anything.
I have not done the next page yet but does this it seem fine to put a select info from the Database WHERE Request.QueryString= 'DesignId'?
*Left scrathing my head like a chimp here:D*
David Jenkins
-------------------------------------------------------------
Do you want to make extra money around your commitments?
Credit cards, bills, loans and a mortgage - all getting you down?
Is your pension going to be enough when you retire?
There is a solution visit
http://www.1stmillion.co.uk
or call 01772 489521