Last post Oct 04, 2008 08:26 AM by Chris147
Oct 02, 2008 10:14 AM|Chris147|LINK
Sorry if this question has already been answered (I suspect it has but I can't find a related post).
I have a DropDown List bound to a table in an Access Database (with autopostback enabled) that works just fine but I need to populate two text boxes from the same table depending on the selection made in the drop down list.
I know Access very well but I'm a complete novice when it comes to ASP.Net (I'm having to learn it on the fly) so I'd really appreciate some help.
Oct 02, 2008 02:44 PM|Mikesdotnetting|LINK
Use the Configure DataSource option on the smart tag that appears on the top right of the DataSource control when you have added it to the page. The DataSource forces you to use parameters (a good thing), and you need to select the control from which the
value comes - in your case, the DropDownList. There's quite a lot of help with Access and ASP.NET here:
Oct 02, 2008 03:39 PM|Chris147|LINK
I must admit, you reply has left me a bit confused though (the problem with being a complete novice). The DataSource is configured already and is used by the DropDownList. This is working ok. Am I missing something obvious here?
I tried your link, thanks, but the site appears to be down (at least, it won't open).
Oct 04, 2008 05:11 AM|Mikesdotnetting|LINK
While you have already configured the datasource, it is possible to use the smart tag to reconfigure it. That's what I suggested you do.
And yes, that site does appear to be down at the moment. Pity.
Oct 04, 2008 08:26 AM|Chris147|LINK
Ah, I see.
I will try your method, thanks.
I did, late last night, finally figure out a way to do what I wanted but it's very clumsy (or so it seems to me). I added a second AccessDataSource to the page with exactly the same parameters as the one used in the DropDownList and linked it to an (invisible)
FormView control. The FormView is filtered by the selection made in the DropDownList and I can then use DirectCast to pass the relevant field data to my TextBox (I had to add the code for this last bit to the Page_SaveStateComplete Sub to get the correct
Thanks for your help on this Mike, it is greatly appreciated.