Name of control

Discussion in 'ASP .Net' started by Jim McGivney, Apr 26, 2006.

  1. Jim McGivney

    Jim McGivney Guest

    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
    Jim McGivney, Apr 26, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?iso-8859-1?B?bW9vcJk=?=
    Replies:
    7
    Views:
    810
    Roedy Green
    Jan 2, 2006
  2. ding feng
    Replies:
    2
    Views:
    2,790
    ding feng
    Jun 25, 2003
  3. Bobby Chamness
    Replies:
    2
    Views:
    2,380
    Joe Smith
    Apr 22, 2007
  4. Jack-2
    Replies:
    3
    Views:
    255
    Jack-2
    Dec 24, 2003
  5. Java  script  Dude

    IE name="name" & form.name property bug

    Java script Dude, Jun 29, 2004, in forum: Javascript
    Replies:
    5
    Views:
    228
    Java script Dude
    Jun 30, 2004
Loading...

Share This Page