Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Frame

Frame

Scheduled Pinned Locked Moved ASP.NET
designhelp
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    V 2
    wrote on last edited by
    #1

    Hi, I have used frames in my page i wanna dynamically load frame For this i used this code in code behind Dim fram As New System.Web.UI.HtmlControls.HtmlForm fram = CType(Me.FindControl("lower_frame"), HtmlControl) Dim src As String src = "left frame.aspx" With fram .Attributes("src") = src .Attributes("width") = "100%" .Attributes("height") = "328px" End With It gives error that Object reference not set to an instance of an object. Thanks with anticaption

    Unless u don't give ur hundred percent whatever u r doning till there is no result of ur work...

    P E V 3 Replies Last reply
    0
    • V V 2

      Hi, I have used frames in my page i wanna dynamically load frame For this i used this code in code behind Dim fram As New System.Web.UI.HtmlControls.HtmlForm fram = CType(Me.FindControl("lower_frame"), HtmlControl) Dim src As String src = "left frame.aspx" With fram .Attributes("src") = src .Attributes("width") = "100%" .Attributes("height") = "328px" End With It gives error that Object reference not set to an instance of an object. Thanks with anticaption

      Unless u don't give ur hundred percent whatever u r doning till there is no result of ur work...

      P Offline
      P Offline
      Parwej Ahamad
      wrote on last edited by
      #2

      I noticed that you are trying to assign frame control in Form control. Dim fram As New System.Web.UI.HtmlControls.HtmlForm fram = CType(Me.FindControl("lower_frame"), HtmlControl) (1) You can use by make it as runat server or try this: Dim frame1 As HtmlControl = CType(Me.FindControl("frame1"), HtmlControl)

      Parwej Ahamad R & D with IIS 5.0/6.0

      V 1 Reply Last reply
      0
      • V V 2

        Hi, I have used frames in my page i wanna dynamically load frame For this i used this code in code behind Dim fram As New System.Web.UI.HtmlControls.HtmlForm fram = CType(Me.FindControl("lower_frame"), HtmlControl) Dim src As String src = "left frame.aspx" With fram .Attributes("src") = src .Attributes("width") = "100%" .Attributes("height") = "328px" End With It gives error that Object reference not set to an instance of an object. Thanks with anticaption

        Unless u don't give ur hundred percent whatever u r doning till there is no result of ur work...

        E Offline
        E Offline
        eyeseetee
        wrote on last edited by
        #3

        Have you spelt the findcontrol name wrong? check that first object reference means you are trying to reference something that doesnt exist yet

        We are not a Code Charity

        1 Reply Last reply
        0
        • P Parwej Ahamad

          I noticed that you are trying to assign frame control in Form control. Dim fram As New System.Web.UI.HtmlControls.HtmlForm fram = CType(Me.FindControl("lower_frame"), HtmlControl) (1) You can use by make it as runat server or try this: Dim frame1 As HtmlControl = CType(Me.FindControl("frame1"), HtmlControl)

          Parwej Ahamad R & D with IIS 5.0/6.0

          V Offline
          V Offline
          V 2
          wrote on last edited by
          #4

          Thanks 4 ur quick response I have made it runat="server" n used this Dim frame1 As HtmlControl = CType(Me.FindControl("frame1"), HtmlControl) but still facing the same problem....

          Unless u don't give ur hundred percent whatever u r doning till there is no result of ur work...

          P 1 Reply Last reply
          0
          • V V 2

            Thanks 4 ur quick response I have made it runat="server" n used this Dim frame1 As HtmlControl = CType(Me.FindControl("frame1"), HtmlControl) but still facing the same problem....

            Unless u don't give ur hundred percent whatever u r doning till there is no result of ur work...

            P Offline
            P Offline
            Parwej Ahamad
            wrote on last edited by
            #5

            Hi, find with your frame id which i have bold: Dim frame1 As HtmlControl = CType(Me.FindControl("your_Frame_id"), HtmlControl

            Parwej Ahamad R & D with IIS 5.0/6.0

            1 Reply Last reply
            0
            • V V 2

              Hi, I have used frames in my page i wanna dynamically load frame For this i used this code in code behind Dim fram As New System.Web.UI.HtmlControls.HtmlForm fram = CType(Me.FindControl("lower_frame"), HtmlControl) Dim src As String src = "left frame.aspx" With fram .Attributes("src") = src .Attributes("width") = "100%" .Attributes("height") = "328px" End With It gives error that Object reference not set to an instance of an object. Thanks with anticaption

              Unless u don't give ur hundred percent whatever u r doning till there is no result of ur work...

              V Offline
              V Offline
              V 2
              wrote on last edited by
              #6

              Thanks to both of u i wrote right in my project but by mistake wrong in above post this is frame <frame name="right_frame" src="rightframe.aspx" runtat="Server"/> in code behind Dim frame1 As HtmlControl = CType(Me.FindControl("right_frame"), HtmlControl) Dim src As String src = "abc.aspx" With frame1 .Attributes("src") = src .Attributes("width") = "100%" .Attributes("height") = "328px" End With i don't know where i m wrong???

              Unless u don't give ur hundred percent whatever u r doning till there is no result of ur work...

              P 1 Reply Last reply
              0
              • V V 2

                Thanks to both of u i wrote right in my project but by mistake wrong in above post this is frame <frame name="right_frame" src="rightframe.aspx" runtat="Server"/> in code behind Dim frame1 As HtmlControl = CType(Me.FindControl("right_frame"), HtmlControl) Dim src As String src = "abc.aspx" With frame1 .Attributes("src") = src .Attributes("width") = "100%" .Attributes("height") = "328px" End With i don't know where i m wrong???

                Unless u don't give ur hundred percent whatever u r doning till there is no result of ur work...

                P Offline
                P Offline
                Parwej Ahamad
                wrote on last edited by
                #7

                Are you using frameset ? If no then change as below <IFRAME name="right_frame" src="rightframe.aspx" runtat="Server"/>

                Parwej Ahamad R & D with IIS 5.0/6.0

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups