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. HTML control

HTML control

Scheduled Pinned Locked Moved ASP.NET
csharphtmlhelpquestion
5 Posts 2 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.
  • C Offline
    C Offline
    Commickey
    wrote on last edited by
    #1

    Hello I have this code: Whatever.Attributes.Add("Page_Load", "parent.frames('main2').location.href='EmployeeList.aspx?" +inLogUs + "'"); Whatever is the Id of the body section of the HTML but for reasons, I do not know why it cannot be recognised in the C# code. It says the name space whatever could not be found. Can someone help me with this? I am making sure that I send variables that that page as well as setting the target frame...

    G 1 Reply Last reply
    0
    • C Commickey

      Hello I have this code: Whatever.Attributes.Add("Page_Load", "parent.frames('main2').location.href='EmployeeList.aspx?" +inLogUs + "'"); Whatever is the Id of the body section of the HTML but for reasons, I do not know why it cannot be recognised in the C# code. It says the name space whatever could not be found. Can someone help me with this? I am making sure that I send variables that that page as well as setting the target frame...

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      As the body is not inside the form, it's not declared automatically in codebehind. You have to declare it to access it: protected HtmlGenrericControl Whatever; There is however no attribute named "Page_Load" in the body element. What are you trying to accomplish? --- b { font-weight: normal; }

      C 2 Replies Last reply
      0
      • G Guffa

        As the body is not inside the form, it's not declared automatically in codebehind. You have to declare it to access it: protected HtmlGenrericControl Whatever; There is however no attribute named "Page_Load" in the body element. What are you trying to accomplish? --- b { font-weight: normal; }

        C Offline
        C Offline
        Commickey
        wrote on last edited by
        #3

        Hello, Thanks for the reply, with page_load, I want the attributes sent to be recognised as soon as the target page loads.....

        1 Reply Last reply
        0
        • G Guffa

          As the body is not inside the form, it's not declared automatically in codebehind. You have to declare it to access it: protected HtmlGenrericControl Whatever; There is however no attribute named "Page_Load" in the body element. What are you trying to accomplish? --- b { font-weight: normal; }

          C Offline
          C Offline
          Commickey
          wrote on last edited by
          #4

          Hello, I tried ur suggestion but it doesn't go to the requested page. D whatever had been declared just like u suggested. and my question is that , do I still need to define it also in the HTML section? because that is how it is right now and it is not working

          G 1 Reply Last reply
          0
          • C Commickey

            Hello, I tried ur suggestion but it doesn't go to the requested page. D whatever had been declared just like u suggested. and my question is that , do I still need to define it also in the HTML section? because that is how it is right now and it is not working

            G Offline
            G Offline
            Guffa
            wrote on last edited by
            #5

            Commickey wrote:

            Hello, I tried ur suggestion but it doesn't go to the requested page.

            Of course it doesn't. As I said, there is no page_load property. To run the code as the page has loaded you use the onload property. --- b { font-weight: normal; }

            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