G
Guest
Hi
I'm trying to use my AccessDataSource which retrieves 1 record based on a
querystring, and display the various fields as Label controls on my page.
At the moment, the code compiles, but nothing appears on the page. Can some
explain why, and what I need to do to make it work?
Cheers, Dan.
Here's my data source...
<asp:AccessDataSource ID="adsStory" runat="server"
DataFile="~/App_Data/BeggarsBelief.mdb"
SelectCommand="SELECT [StoryTitle], [Synopsis], [Story], [Name],
[Visits] FROM [Stories] WHERE ([StoryID] = ?)">
<SelectParameters>
<asp:QueryStringParameter Type="Int32"
QueryStringField="id" />
</SelectParameters>
</asp:AccessDataSource>
and here's the label for the StoryTitle...
<h1><asp:Label runat="server" Text='<%# DataBinder.Eval(adsStory,
"[StoryTitle]") %>' ID="lblHeading" /></h1>
There's nothing added to the codebehind for the page.
I'm trying to use my AccessDataSource which retrieves 1 record based on a
querystring, and display the various fields as Label controls on my page.
At the moment, the code compiles, but nothing appears on the page. Can some
explain why, and what I need to do to make it work?
Cheers, Dan.
Here's my data source...
<asp:AccessDataSource ID="adsStory" runat="server"
DataFile="~/App_Data/BeggarsBelief.mdb"
SelectCommand="SELECT [StoryTitle], [Synopsis], [Story], [Name],
[Visits] FROM [Stories] WHERE ([StoryID] = ?)">
<SelectParameters>
<asp:QueryStringParameter Type="Int32"
QueryStringField="id" />
</SelectParameters>
</asp:AccessDataSource>
and here's the label for the StoryTitle...
<h1><asp:Label runat="server" Text='<%# DataBinder.Eval(adsStory,
"[StoryTitle]") %>' ID="lblHeading" /></h1>
There's nothing added to the codebehind for the page.