Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Name of control

Reply
Thread Tools

Name of control

 
 
Jim McGivney
Guest
Posts: n/a
 
      04-26-2006
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.AppSetti ngs["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.AccessData Source3



When I try:

DetailsView1.Field1Sex.EditItemTemplate.AccessData Source3.DataFile =
System.Configuration.ConfigurationManager.AppSetti ngs["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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a variable name to a hash to name is part of the variable name Bobby Chamness Perl 2 04-22-2007 09:54 PM
print("my name is {name}, and {age}-year old {gender}", name, age, gender); =?iso-8859-1?B?bW9vcJk=?= Java 7 01-02-2006 04:39 PM
Compilation fails when a windows form user control is assigned a strong name but it refers to an activex control which does not have strong name ashish_gokhale ASP .Net Web Controls 0 05-05-2005 01:38 PM
name = name.substring(0, name.lastIndexOf('.')); Help please Jack-2 Javascript 3 12-24-2003 04:39 PM
Re: Urgent! how to get object name, method name and attribute name based on the strings? ding feng C++ 2 06-25-2003 01:18 PM



Advertisments