Name of control

J

Jim McGivney

IN VWD, on an aspx page I have a DetailsView control. I have placed an
AccessDataSource (AccessDataSource3) in the EditItemTemplate for the Row
called "Sex". I want to programatically change the datafile for the
AccessDataSource.



In the Page_Load event I try:

AccessDataSource3.DataFile =
System.Configuration.ConfigurationManager.AppSettings["ConnString"];

And get the error: AccessDataSource3 does not exist in current context



When I click on AccessDataSource3, I see in the properties window the name
of the control is: DetailsView1.Field1Sex.EditItemTemplate.AccessDataSource3



When I try:

DetailsView1.Field1Sex.EditItemTemplate.AccessDataSource3.DataFile =
System.Configuration.ConfigurationManager.AppSettings["ConnString"];

I get the error:

System.Web.UI.WebControls.DetailsView does not contain a definition for
Field1Sex



How do I get the name of this control (AccessDataSource3) ?



Thanks in Advance for your help,

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top