What is name of class to make an object of div class ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jagdeep gupta
    New Member
    • Aug 2010
    • 98

    #1

    What is name of class to make an object of div class ?

    Actually i want to cast the type from find control to div but i cant find the class with div or body or form name why so?
  • Bryan Cheung
    New Member
    • Nov 2010
    • 55

    #2
    HtmlGenericCont rol

    Comment

    • jagdeep gupta
      New Member
      • Aug 2010
      • 98

      #3
      @Bryan Cheung: Thanks for reply but i could not get that actually i'm using it like:
      Code:
      object a=Form1.FindControl("X_Div");
      At place of a i want to get the Div element how to get?

      Comment

      • Bryan Cheung
        New Member
        • Nov 2010
        • 55

        #4
        Code:
        HtmlGenericControl divMenu = (HtmlGenericControl)control.FindControl("divMenu");
        This works. And you have to understand that if you cast it to a object and not HtmlGenericCont rol you can only use members of the object class. If this is all you need sure, but HtmlGenericCont rol gives you much more control.

        Comment

        • jagdeep gupta
          New Member
          • Aug 2010
          • 98

          #5
          Thanks a lot Bryan Cheung i understand the point

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            A Panel is rendered as a Div.

            -Frinny

            Comment

            Working...