G
Guest
Hi guys
I have the following AccessDataSource control on my page..
<asp:AccessDataSource ID="adsAllStories" runat="server"
DataFile="~/App_Data/Stories.mdb"
SelectCommand="SELECT StoryID, StoryTitle FROM Stories WHERE
StoryTitle LIKE '?%' ORDER BY StoryID DESC">
<SelectParameters>
<asparameter Type="char" DefaultValue="A" Name="AllParam" />
</SelectParameters>
</asp:AccessDataSource>
I also have a code generate A-Z link list, which when clicked reload the
page with the querystring ?id= <whichever letter I click>
I'm trying to change the value of the AllParam property on the datasource
when we read the querystring, but i can only find DefaultValue as a property,
and when I watch it, it says that "DefaultValue does not exist in the current
context".
The code I'm using in Page_PreRender is...
adsAllStories.SelectParameters["AllParam"].DefaultValue = showChar; // a char
I'm not using a querystringparameter because I'm performing other functions
on showChar before I pass it to the SelectParameters.
But.. how can I pass it to the accessDataSource?!?!
Thanks,
Dan
I have the following AccessDataSource control on my page..
<asp:AccessDataSource ID="adsAllStories" runat="server"
DataFile="~/App_Data/Stories.mdb"
SelectCommand="SELECT StoryID, StoryTitle FROM Stories WHERE
StoryTitle LIKE '?%' ORDER BY StoryID DESC">
<SelectParameters>
<asparameter Type="char" DefaultValue="A" Name="AllParam" />
</SelectParameters>
</asp:AccessDataSource>
I also have a code generate A-Z link list, which when clicked reload the
page with the querystring ?id= <whichever letter I click>
I'm trying to change the value of the AllParam property on the datasource
when we read the querystring, but i can only find DefaultValue as a property,
and when I watch it, it says that "DefaultValue does not exist in the current
context".
The code I'm using in Page_PreRender is...
adsAllStories.SelectParameters["AllParam"].DefaultValue = showChar; // a char
I'm not using a querystringparameter because I'm performing other functions
on showChar before I pass it to the SelectParameters.
But.. how can I pass it to the accessDataSource?!?!
Thanks,
Dan