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. Problem in converting HTML page to user control

Problem in converting HTML page to user control

Scheduled Pinned Locked Moved ASP.NET
questionjavascripthelphtmlcss
2 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.
  • A Offline
    A Offline
    AumSingh
    wrote on last edited by
    #1

    Hello all, I have two queries related to user control. One, how can i include a .js and .css file in an .ascx page? Are we allowed to use tag, if yes then can I just include them as usual by using tag? Two, I have an HTML(not aspx) page which i want to convert to a user control. I have javascript functions being called on the "load" and "onmousedown" event for the body of the HTML page. But since user contriol do not have body so how do I implement it...? Please help...

    N 1 Reply Last reply
    0
    • A AumSingh

      Hello all, I have two queries related to user control. One, how can i include a .js and .css file in an .ascx page? Are we allowed to use tag, if yes then can I just include them as usual by using tag? Two, I have an HTML(not aspx) page which i want to convert to a user control. I have javascript functions being called on the "load" and "onmousedown" event for the body of the HTML page. But since user contriol do not have body so how do I implement it...? Please help...

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      om pr wrote:

      One, how can i include a .js and .css file in an .ascx page? Are we allowed to use tag, if yes then can I just include them as usual by using tag?

      Yes you can do that. Or you can include them in the page where you will use them.

      om pr wrote:

      Two, I have an HTML(not aspx) page which i want to convert to a user control. I have javascript functions being called on the "load" and "onmousedown" event for the body of the HTML page. But since user contriol do not have body so how do I implement it...?

      HTML you can convert to user controls. Since it doesn't have a body tag, you should call OnLoad events inside the page where you use them.

      All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

      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