Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can <asp:accessdatasource> have a variable?

Status
Not open for further replies.

ola123

Technical User
Sep 16, 2005
52
JM
hello world,
with programming anything is possible, ... right?

Im just wondering where i have '500', in the code below is it possible to replace that with a variable
Code:
<asp:AccessDataSource runat="server" id="booksource" datafile="project.mdb"
        SelectCommand="SELECT * FROM [bmis4] WHERE ID='500'">          
    </asp:AccessDataSource>

Im sorry but for some reason i feel like im asking a stupid question, thanks for all the relies i've got from you guys though

what i really want is to create a search to display one record from a database, ive gotten some responses but they were kinda complicated for me a tutorial or link that speak directly to that would greatly be appreciated.


Thanks in advance
B2DB
Cool Nuh Man
 
try '<%# variableName%>' and map variableName to a Property.

failing that, on the PageInit or PageLoad method in teh code behind, find the control adn add the desired variable in programatically?

K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top