can't get Me.FindControl to work

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AAaron123

    can't get Me.FindControl to work

    Me.FindControl( "MissionSchedul eID"), below returns null.

    Do you know what I'm doing wrong?

    Thanks

    ***In my .aspx file I have:

    asp:Content ID="Content3" contentplacehol derid="MainMast erLeftDataID"
    runat="server">

    <div class="MainMast erDataAqua">

    ...snip...Radio Buttons



    </div>

    <br />

    <iframe runat="server" id="MissionSche duleID" frameborder="0"
    src="Schedule.h tm" width="100%" height="100%" </iframe</asp:Content>

    ***In the .vb file:

    Protected WithEvents frame1 As System.Web.UI.H tmlControls.Htm lGenericControl

    Protected Sub RadioButtonMiss ion_CheckedChan ged(ByVal sender As Object,
    ByVal e As System.EventArg s) Handles RadioButtonMiss ion.CheckedChan ged



    frame1 = CType(Me.FindCo ntrol("MissionS cheduleID"), HtmlControl)


  • HillBilly

    #2
    Re: can't get Me.FindControl to work

    To find controls in the content page:

    1st we have to ensure we type the Master in the content page...
    <%@ MasterType VirtualPath="~/Masters/MasterPage.mast er" %>

    2nd enable trace in the content page and observe all of the parent
    containers using the FindControl on each of them...

    Master.FindCont rol("...").Find Control("..."). FindControl"Mis sionScheduleID" )




    "AAaron123" <aaaron123@road runner.comwrote in message
    news:uZ5owGlAJH A.3648@TK2MSFTN GP02.phx.gbl...
    Me.FindControl( "MissionSchedul eID"), below returns null.
    >
    Do you know what I'm doing wrong?
    >
    Thanks
    >
    ***In my .aspx file I have:
    >
    asp:Content ID="Content3" contentplacehol derid="MainMast erLeftDataID"
    runat="server">
    >
    <div class="MainMast erDataAqua">
    >
    ..snip...RadioB uttons
    >
    >
    >
    </div>
    >
    <br />
    >
    <iframe runat="server" id="MissionSche duleID" frameborder="0"
    src="Schedule.h tm" width="100%" height="100%" </iframe</asp:Content>
    >
    ***In the .vb file:
    >
    Protected WithEvents frame1 As
    System.Web.UI.H tmlControls.Htm lGenericControl
    >
    Protected Sub RadioButtonMiss ion_CheckedChan ged(ByVal sender As Object,
    ByVal e As System.EventArg s) Handles RadioButtonMiss ion.CheckedChan ged
    >
    >
    >
    frame1 = CType(Me.FindCo ntrol("MissionS cheduleID"), HtmlControl)
    >
    >

    Comment

    • AAaron123

      #3
      Re: can't get Me.FindControl to work

      Your note got me closer.

      First time I saw trace output.
      Not sure how to recognize parents.
      Mabye the part reproduced below?

      I tried QuickWatch with Master.FindCont rol("...") with tried different
      things.
      aspnetForm id not work but Table1 did. So I tried :

      Master.FindCont rol("Table1").F indControl("Tab leRow9") but that didn't work.

      Am I getting close or wondering afar?

      Thanks for the help

      __Page
      ctl00
      ctl00$ctl04
      ctl00$Head1
      ctl00$ctl00
      ctl00$ctl01
      ctl00$ctl02
      ctl00$ctl05
      ctl00$ctl03
      ctl00$ctl06
      ctl00$ctl07
      aspnetForm
      ctl00$ctl08
      ctl00$Table1
      ctl00$TableRow0
      ctl00$TableCell R0C0S2
      ctl00$TableRow1
      ctl00$TableRow2
      ctl00$TableCell R2C0S2
      ctl00$Navigatio nMenu
      ctl00$TableRow3
      ctl00$TableCell R3C0
      ctl00$TableCell R3C1
      ctl00$SiteMapPa th1
      ctl00$TableRow4
      snip...
      ctl00$MainMaste rDataRightID
      ctl00$MainMaste rDataRightID$ct l00
      ctl00$TableRow8
      ctl00$TableCell R8C0
      ctl00$TableRow9
      ctl00$TableCell R9C0
      ctl00$MainMaste rLeftDataID
      ctl00$MainMaste rLeftDataID$ctl 00
      ctl00$MainMaste rLeftDataID$Rad ioButtonMission
      ctl00$MainMaste rLeftDataID$ctl 01
      ctl00$MainMaste rLeftDataID$Rad ioButtonSchedul es
      ctl00$MainMaste rLeftDataID$ctl 02
      ctl00$MainMaste rLeftDataID$Mis sionScheduleID
      ctl00$MainMaste rLeftDataID$ctl 03
      ctl00$TableRow1 0




      "HillBilly" <somebody@somew here.comwrote in message
      news:%231K0KWlA JHA.3784@TK2MSF TNGP03.phx.gbl. ..
      To find controls in the content page:
      >
      1st we have to ensure we type the Master in the content page...
      <%@ MasterType VirtualPath="~/Masters/MasterPage.mast er" %>
      >
      2nd enable trace in the content page and observe all of the parent
      containers using the FindControl on each of them...
      >
      Master.FindCont rol("...").Find Control("..."). FindControl"Mis sionScheduleID" )
      >
      >
      >
      >
      "AAaron123" <aaaron123@road runner.comwrote in message
      news:uZ5owGlAJH A.3648@TK2MSFTN GP02.phx.gbl...
      >Me.FindControl ("MissionSchedu leID"), below returns null.
      >>
      >Do you know what I'm doing wrong?
      >>
      >Thanks
      >>
      >***In my .aspx file I have:
      >>
      >asp:Content ID="Content3" contentplacehol derid="MainMast erLeftDataID"
      >runat="server" >
      >>
      ><div class="MainMast erDataAqua">
      >>
      >..snip...Radio Buttons
      >>
      >>
      >>
      ></div>
      >>
      ><br />
      >>
      ><iframe runat="server" id="MissionSche duleID" frameborder="0"
      >src="Schedule. htm" width="100%" height="100%" </iframe</asp:Content>
      >>
      >***In the .vb file:
      >>
      >Protected WithEvents frame1 As
      >System.Web.UI. HtmlControls.Ht mlGenericContro l
      >>
      >Protected Sub RadioButtonMiss ion_CheckedChan ged(ByVal sender As Object,
      >ByVal e As System.EventArg s) Handles RadioButtonMiss ion.CheckedChan ged
      >>
      >>
      >>
      >frame1 = CType(Me.FindCo ntrol("MissionS cheduleID"), HtmlControl)
      >>
      >>
      >

      Comment

      • AAaron123

        #4
        Re: can't get Me.FindControl to work

        Typos??? Maybe. but what I couldn't get to working yesterday works OK today.
        So I'm all set.

        Except I'm wondering.
        I find it works with or without:
        <%@ MasterType VirtualPath="~/Main.master" %>



        Is that some how covered in:

        <%@ Page AutoEventWireup ="false" Language="VB"
        MasterPageFile= "~/Main.master" Title="Internet Site"

        CodeFile="Defau lt.aspx.vb" Inherits="Defau lt_aspx"
        MaintainScrollP ositionOnPostba ck="true" Trace="true" %>



        I read the help about MasterType but don't fully understand it.

        Is it that "Master" can return different things so what I want needs to be
        specified?



        Thanks for the help


        "HillBilly" <somebody@somew here.comwrote in message
        news:%231K0KWlA JHA.3784@TK2MSF TNGP03.phx.gbl. ..
        To find controls in the content page:
        >
        1st we have to ensure we type the Master in the content page...
        <%@ MasterType VirtualPath="~/Masters/MasterPage.mast er" %>
        >
        2nd enable trace in the content page and observe all of the parent
        containers using the FindControl on each of them...
        >
        Master.FindCont rol("...").Find Control("..."). FindControl"Mis sionScheduleID" )
        >
        >
        >
        >
        "AAaron123" <aaaron123@road runner.comwrote in message
        news:uZ5owGlAJH A.3648@TK2MSFTN GP02.phx.gbl...
        >Me.FindControl ("MissionSchedu leID"), below returns null.
        >>
        >Do you know what I'm doing wrong?
        >>
        >Thanks
        >>
        >***In my .aspx file I have:
        >>
        >asp:Content ID="Content3" contentplacehol derid="MainMast erLeftDataID"
        >runat="server" >
        >>
        ><div class="MainMast erDataAqua">
        >>
        >..snip...Radio Buttons
        >>
        >>
        >>
        ></div>
        >>
        ><br />
        >>
        ><iframe runat="server" id="MissionSche duleID" frameborder="0"
        >src="Schedule. htm" width="100%" height="100%" </iframe</asp:Content>
        >>
        >***In the .vb file:
        >>
        >Protected WithEvents frame1 As
        >System.Web.UI. HtmlControls.Ht mlGenericContro l
        >>
        >Protected Sub RadioButtonMiss ion_CheckedChan ged(ByVal sender As Object,
        >ByVal e As System.EventArg s) Handles RadioButtonMiss ion.CheckedChan ged
        >>
        >>
        >>
        >frame1 = CType(Me.FindCo ntrol("MissionS cheduleID"), HtmlControl)
        >>
        >>
        >

        Comment

        • HillBilly

          #5
          Re: can't get Me.FindControl to work

          I might have it bass ackwards but typing the Master is required to reference
          controls found in the content page after the master has been merged with the
          content page by the compiler which must generate separate control trees that
          get merged into one; referencing controls in the MasterPage itself would not
          then require typing as their type is already known. Its something like that.

          Go to K. Scott Allen's definitive discussion of the topic at



          "AAaron123" <aaaron123@road runner.comwrote in message
          news:%23hADJlsA JHA.2056@TK2MSF TNGP05.phx.gbl. ..
          Typos??? Maybe. but what I couldn't get to working yesterday works OK
          today.
          So I'm all set.
          >
          Except I'm wondering.
          I find it works with or without:
          <%@ MasterType VirtualPath="~/Main.master" %>
          >
          >
          >
          Is that some how covered in:
          >
          <%@ Page AutoEventWireup ="false" Language="VB"
          MasterPageFile= "~/Main.master" Title="Internet Site"
          >
          CodeFile="Defau lt.aspx.vb" Inherits="Defau lt_aspx"
          MaintainScrollP ositionOnPostba ck="true" Trace="true" %>
          >
          >
          >
          I read the help about MasterType but don't fully understand it.
          >
          Is it that "Master" can return different things so what I want needs to be
          specified?
          >
          >
          >
          Thanks for the help
          >
          >
          "HillBilly" <somebody@somew here.comwrote in message
          news:%231K0KWlA JHA.3784@TK2MSF TNGP03.phx.gbl. ..
          >To find controls in the content page:
          >>
          >1st we have to ensure we type the Master in the content page...
          ><%@ MasterType VirtualPath="~/Masters/MasterPage.mast er" %>
          >>
          >2nd enable trace in the content page and observe all of the parent
          >containers using the FindControl on each of them...
          >>
          >Master.FindCon trol("...").Fin dControl("...") .FindControl"Mi ssionScheduleID ")
          >>
          >>
          >>
          >>
          >"AAaron123" <aaaron123@road runner.comwrote in message
          >news:uZ5owGlAJ HA.3648@TK2MSFT NGP02.phx.gbl.. .
          >>Me.FindContro l("MissionSched uleID"), below returns null.
          >>>
          >>Do you know what I'm doing wrong?
          >>>
          >>Thanks
          >>>
          >>***In my .aspx file I have:
          >>>
          >>asp:Content ID="Content3" contentplacehol derid="MainMast erLeftDataID"
          >>runat="server ">
          >>>
          >><div class="MainMast erDataAqua">
          >>>
          >>..snip...Radi oButtons
          >>>
          >>>
          >>>
          >></div>
          >>>
          >><br />
          >>>
          >><iframe runat="server" id="MissionSche duleID" frameborder="0"
          >>src="Schedule .htm" width="100%" height="100%" </iframe</asp:Content>
          >>>
          >>***In the .vb file:
          >>>
          >>Protected WithEvents frame1 As
          >>System.Web.UI .HtmlControls.H tmlGenericContr ol
          >>>
          >>Protected Sub RadioButtonMiss ion_CheckedChan ged(ByVal sender As Object,
          >>ByVal e As System.EventArg s) Handles RadioButtonMiss ion.CheckedChan ged
          >>>
          >>>
          >>>
          >>frame1 = CType(Me.FindCo ntrol("MissionS cheduleID"), HtmlControl)
          >>>
          >>>
          >>
          >
          >

          Comment

          • HillBilly

            #6
            Re: can't get Me.FindControl to work

            Can you pull the control your trying to reference out of the HtmlTable
            control and write the HTML yourself? Your control and its parent containers
            will be easier to read and access. Generally speaking parent containers will
            be controls templates used in the content pages.

            But otherwise, keep trying with each table item like
            Master.FindCont rol("Table1").F indControl("Tab leRow9").FindCo ntrol("TableCel lR9C0").FindCon trol("...")
            until you find it. Another way to determine a container is to read the
            control's Type in the Control Tree. Its often a guessing game and trying
            until you get the right containers identified. Very messy with MasterPages


            "AAaron123" <aaaron123@road runner.comwrote in message
            news:uMvznPmAJH A.1184@TK2MSFTN GP04.phx.gbl...
            Your note got me closer.
            >
            First time I saw trace output.
            Not sure how to recognize parents.
            Mabye the part reproduced below?
            >
            I tried QuickWatch with Master.FindCont rol("...") with tried different
            things.
            aspnetForm id not work but Table1 did. So I tried :
            >
            Master.FindCont rol("Table1").F indControl("Tab leRow9") but that didn't
            work.
            >
            Am I getting close or wondering afar?
            >
            Thanks for the help
            >
            __Page
            ctl00
            ctl00$ctl04
            ctl00$Head1
            ctl00$ctl00
            ctl00$ctl01
            ctl00$ctl02
            ctl00$ctl05
            ctl00$ctl03
            ctl00$ctl06
            ctl00$ctl07
            aspnetForm
            ctl00$ctl08
            ctl00$Table1
            ctl00$TableRow0
            ctl00$TableCell R0C0S2
            ctl00$TableRow1
            ctl00$TableRow2
            ctl00$TableCell R2C0S2
            ctl00$Navigatio nMenu
            ctl00$TableRow3
            ctl00$TableCell R3C0
            ctl00$TableCell R3C1
            ctl00$SiteMapPa th1
            ctl00$TableRow4
            snip...
            ctl00$MainMaste rDataRightID
            ctl00$MainMaste rDataRightID$ct l00
            ctl00$TableRow8
            ctl00$TableCell R8C0
            ctl00$TableRow9
            ctl00$TableCell R9C0
            ctl00$MainMaste rLeftDataID
            ctl00$MainMaste rLeftDataID$ctl 00
            ctl00$MainMaste rLeftDataID$Rad ioButtonMission
            ctl00$MainMaste rLeftDataID$ctl 01
            ctl00$MainMaste rLeftDataID$Rad ioButtonSchedul es
            ctl00$MainMaste rLeftDataID$ctl 02
            ctl00$MainMaste rLeftDataID$Mis sionScheduleID
            ctl00$MainMaste rLeftDataID$ctl 03
            ctl00$TableRow1 0
            >
            >
            >
            >
            "HillBilly" <somebody@somew here.comwrote in message
            news:%231K0KWlA JHA.3784@TK2MSF TNGP03.phx.gbl. ..
            >To find controls in the content page:
            >>
            >1st we have to ensure we type the Master in the content page...
            ><%@ MasterType VirtualPath="~/Masters/MasterPage.mast er" %>
            >>
            >2nd enable trace in the content page and observe all of the parent
            >containers using the FindControl on each of them...
            >>
            >Master.FindCon trol("...").Fin dControl("...") .FindControl"Mi ssionScheduleID ")
            >>
            >>
            >>
            >>
            >"AAaron123" <aaaron123@road runner.comwrote in message
            >news:uZ5owGlAJ HA.3648@TK2MSFT NGP02.phx.gbl.. .
            >>Me.FindContro l("MissionSched uleID"), below returns null.
            >>>
            >>Do you know what I'm doing wrong?
            >>>
            >>Thanks
            >>>
            >>***In my .aspx file I have:
            >>>
            >>asp:Content ID="Content3" contentplacehol derid="MainMast erLeftDataID"
            >>runat="server ">
            >>>
            >><div class="MainMast erDataAqua">
            >>>
            >>..snip...Radi oButtons
            >>>
            >>>
            >>>
            >></div>
            >>>
            >><br />
            >>>
            >><iframe runat="server" id="MissionSche duleID" frameborder="0"
            >>src="Schedule .htm" width="100%" height="100%" </iframe</asp:Content>
            >>>
            >>***In the .vb file:
            >>>
            >>Protected WithEvents frame1 As
            >>System.Web.UI .HtmlControls.H tmlGenericContr ol
            >>>
            >>Protected Sub RadioButtonMiss ion_CheckedChan ged(ByVal sender As Object,
            >>ByVal e As System.EventArg s) Handles RadioButtonMiss ion.CheckedChan ged
            >>>
            >>>
            >>>
            >>frame1 = CType(Me.FindCo ntrol("MissionS cheduleID"), HtmlControl)
            >>>
            >>>
            >>
            >
            >

            Comment

            • AAaron123

              #7
              Re: can't get Me.FindControl to work


              "HillBilly" <somebody@somew here.comwrote in message
              news:Ov6%237VuA JHA.4964@TK2MSF TNGP02.phx.gbl. ..
              Can you pull the control your trying to reference out of the HtmlTable
              control and write the HTML yourself?
              I don't know what this means. A way of doing it without FindControl maybe??
              >Your control and its parent containers will be easier to read and access.
              >Generally speaking parent containers will be controls templates used in the
              >content pages.
              >
              But otherwise, keep trying with each table item like
              Master.FindCont rol("Table1").F indControl("Tab leRow9").FindCo ntrol("TableCel lR9C0").FindCon trol("...")
              until you find it. Another way to determine a container is to read the
              control's Type in the Control Tree. Its often a guessing game and trying
              until you get the right containers identified. Very messy with MasterPages

              As I mentioned in the other post I did succeed. And I noticed you pulled the
              correct format from the tree without any trouble!

              Thanks
              >
              >
              "AAaron123" <aaaron123@road runner.comwrote in message
              news:uMvznPmAJH A.1184@TK2MSFTN GP04.phx.gbl...
              >Your note got me closer.
              >>
              >First time I saw trace output.
              >Not sure how to recognize parents.
              >Mabye the part reproduced below?
              >>
              >I tried QuickWatch with Master.FindCont rol("...") with tried different
              >things.
              >aspnetForm id not work but Table1 did. So I tried :
              >>
              >Master.FindCon trol("Table1"). FindControl("Ta bleRow9") but that didn't
              >work.
              >>
              >Am I getting close or wondering afar?
              >>
              >Thanks for the help
              >>
              >__Page
              > ctl00
              > ctl00$ctl04
              > ctl00$Head1
              > ctl00$ctl00
              > ctl00$ctl01
              > ctl00$ctl02
              > ctl00$ctl05
              > ctl00$ctl03
              > ctl00$ctl06
              > ctl00$ctl07
              > aspnetForm
              > ctl00$ctl08
              > ctl00$Table1
              > ctl00$TableRow0
              > ctl00$TableCell R0C0S2
              > ctl00$TableRow1
              > ctl00$TableRow2
              > ctl00$TableCell R2C0S2
              > ctl00$Navigatio nMenu
              > ctl00$TableRow3
              > ctl00$TableCell R3C0
              > ctl00$TableCell R3C1
              > ctl00$SiteMapPa th1
              > ctl00$TableRow4
              > snip...
              > ctl00$MainMaste rDataRightID
              > ctl00$MainMaste rDataRightID$ct l00
              > ctl00$TableRow8
              > ctl00$TableCell R8C0
              > ctl00$TableRow9
              > ctl00$TableCell R9C0
              > ctl00$MainMaste rLeftDataID
              > ctl00$MainMaste rLeftDataID$ctl 00
              > ctl00$MainMaste rLeftDataID$Rad ioButtonMission
              > ctl00$MainMaste rLeftDataID$ctl 01
              >>
              >ctl00$MainMast erLeftDataID$Ra dioButtonSchedu les
              > ctl00$MainMaste rLeftDataID$ctl 02
              > ctl00$MainMaste rLeftDataID$Mis sionScheduleID
              > ctl00$MainMaste rLeftDataID$ctl 03
              > ctl00$TableRow1 0
              >>
              >>
              >>
              >>
              >"HillBilly" <somebody@somew here.comwrote in message
              >news:%231K0KWl AJHA.3784@TK2MS FTNGP03.phx.gbl ...
              >>To find controls in the content page:
              >>>
              >>1st we have to ensure we type the Master in the content page...
              >><%@ MasterType VirtualPath="~/Masters/MasterPage.mast er" %>
              >>>
              >>2nd enable trace in the content page and observe all of the parent
              >>containers using the FindControl on each of them...
              >>>
              >>Master.FindCo ntrol("...").Fi ndControl("..." ).FindControl"M issionScheduleI D")
              >>>
              >>>
              >>>
              >>>
              >>"AAaron123" <aaaron123@road runner.comwrote in message
              >>news:uZ5owGlA JHA.3648@TK2MSF TNGP02.phx.gbl. ..
              >>>Me.FindContr ol("MissionSche duleID"), below returns null.
              >>>>
              >>>Do you know what I'm doing wrong?
              >>>>
              >>>Thanks
              >>>>
              >>>***In my .aspx file I have:
              >>>>
              >>>asp:Conten t ID="Content3" contentplacehol derid="MainMast erLeftDataID"
              >>>runat="serve r">
              >>>>
              >>><div class="MainMast erDataAqua">
              >>>>
              >>>..snip...Rad ioButtons
              >>>>
              >>>>
              >>>>
              >>></div>
              >>>>
              >>><br />
              >>>>
              >>><iframe runat="server" id="MissionSche duleID" frameborder="0"
              >>>src="Schedul e.htm" width="100%" height="100%" </iframe>
              >>></asp:Content>
              >>>>
              >>>***In the .vb file:
              >>>>
              >>>Protected WithEvents frame1 As
              >>>System.Web.U I.HtmlControls. HtmlGenericCont rol
              >>>>
              >>>Protected Sub RadioButtonMiss ion_CheckedChan ged(ByVal sender As Object,
              >>>ByVal e As System.EventArg s) Handles RadioButtonMiss ion.CheckedChan ged
              >>>>
              >>>>
              >>>>
              >>>frame1 = CType(Me.FindCo ntrol("MissionS cheduleID"), HtmlControl)
              >>>>
              >>>>
              >>>
              >>
              >>
              >

              Comment

              • AAaron123

                #8
                Re: can't get Me.FindControl to work

                I think it saves add CType.
                But I have this in my .aspx
                Note it is commented out.
                The comments are Allen's
                <%--<%@ MasterType VirtualPath="~/Main.master" %>--%>

                <%--<%@ MasterType VirtualPath="~/otc.master" %>

                Now when ASP.NET codegens the page, it puts the following inside a partial
                class definition.

                Public Shadows ReadOnly Property Master() As otc

                Get

                Return CType(MyBase.Ma ster,otcMaster)

                End Get

                End Property

                --%>



                And this in my .vb

                frame1 =
                Me.Master.FindC ontrol("Table1" ).FindControl(" TableRow9").Fin dControl("Table CellR9C0").Find Control("MainMa sterLeftDataID" ).FindControl(" MissionSchedule ID")

                and it works OK.

                Seems I should need a CType around Me.Master.



                It's academic at this point but interesting.



                thanks






                "HillBilly" <somebody@somew here.comwrote in message
                news:%23QON8VuA JHA.4964@TK2MSF TNGP02.phx.gbl. ..
                >I might have it bass ackwards but typing the Master is required to
                >reference controls found in the content page after the master has been
                >merged with the content page by the compiler which must generate separate
                >control trees that get merged into one; referencing controls in the
                >MasterPage itself would not then require typing as their type is already
                >known. Its something like that.
                >
                Go to K. Scott Allen's definitive discussion of the topic at

                >
                >
                "AAaron123" <aaaron123@road runner.comwrote in message
                news:%23hADJlsA JHA.2056@TK2MSF TNGP05.phx.gbl. ..
                >Typos??? Maybe. but what I couldn't get to working yesterday works OK
                >today.
                >So I'm all set.
                >>
                >Except I'm wondering.
                >I find it works with or without:
                ><%@ MasterType VirtualPath="~/Main.master" %>
                >>
                >>
                >>
                >Is that some how covered in:
                >>
                ><%@ Page AutoEventWireup ="false" Language="VB"
                >MasterPageFile ="~/Main.master" Title="Internet Site"
                >>
                >CodeFile="Defa ult.aspx.vb" Inherits="Defau lt_aspx"
                >MaintainScroll PositionOnPostb ack="true" Trace="true" %>
                >>
                >>
                >>
                >I read the help about MasterType but don't fully understand it.
                >>
                >Is it that "Master" can return different things so what I want needs to
                >be specified?
                >>
                >>
                >>
                >Thanks for the help
                >>
                >>
                >"HillBilly" <somebody@somew here.comwrote in message
                >news:%231K0KWl AJHA.3784@TK2MS FTNGP03.phx.gbl ...
                >>To find controls in the content page:
                >>>
                >>1st we have to ensure we type the Master in the content page...
                >><%@ MasterType VirtualPath="~/Masters/MasterPage.mast er" %>
                >>>
                >>2nd enable trace in the content page and observe all of the parent
                >>containers using the FindControl on each of them...
                >>>
                >>Master.FindCo ntrol("...").Fi ndControl("..." ).FindControl"M issionScheduleI D")
                >>>
                >>>
                >>>
                >>>
                >>"AAaron123" <aaaron123@road runner.comwrote in message
                >>news:uZ5owGlA JHA.3648@TK2MSF TNGP02.phx.gbl. ..
                >>>Me.FindContr ol("MissionSche duleID"), below returns null.
                >>>>
                >>>Do you know what I'm doing wrong?
                >>>>
                >>>Thanks
                >>>>
                >>>***In my .aspx file I have:
                >>>>
                >>>asp:Conten t ID="Content3" contentplacehol derid="MainMast erLeftDataID"
                >>>runat="serve r">
                >>>>
                >>><div class="MainMast erDataAqua">
                >>>>
                >>>..snip...Rad ioButtons
                >>>>
                >>>>
                >>>>
                >>></div>
                >>>>
                >>><br />
                >>>>
                >>><iframe runat="server" id="MissionSche duleID" frameborder="0"
                >>>src="Schedul e.htm" width="100%" height="100%" </iframe>
                >>></asp:Content>
                >>>>
                >>>***In the .vb file:
                >>>>
                >>>Protected WithEvents frame1 As
                >>>System.Web.U I.HtmlControls. HtmlGenericCont rol
                >>>>
                >>>Protected Sub RadioButtonMiss ion_CheckedChan ged(ByVal sender As Object,
                >>>ByVal e As System.EventArg s) Handles RadioButtonMiss ion.CheckedChan ged
                >>>>
                >>>>
                >>>>
                >>>frame1 = CType(Me.FindCo ntrol("MissionS cheduleID"), HtmlControl)
                >>>>
                >>>>
                >>>
                >>
                >>
                >

                Comment

                Working...