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. User Control in ASP.NET

User Control in ASP.NET

Scheduled Pinned Locked Moved ASP.NET
csharpasp-net
4 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.
  • R Offline
    R Offline
    R Palanivel
    wrote on last edited by
    #1

    HI I have created user control that containing one label control and one button control without any code written in code behind.if i use this control in asp.net page using tag its working fine. if i write any code for button click event its not working

    r_palanivel83 10:01 4 Jan '06

    N 1 Reply Last reply
    0
    • R R Palanivel

      HI I have created user control that containing one label control and one button control without any code written in code behind.if i use this control in asp.net page using tag its working fine. if i write any code for button click event its not working

      r_palanivel83 10:01 4 Jan '06

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      You don't need the object tag. Just drop the user control on the page and you'll end up with something like this. <%@ Register Src="UserControls/FooBar.ascx" TagName="FooBar" TagPrefix="uc1" %> <uc1:FooBar id="FooBar1" runat="server"></uc1:FooBar>


      only two letters away from being an asset

      R 1 Reply Last reply
      0
      • N Not Active

        You don't need the object tag. Just drop the user control on the page and you'll end up with something like this. <%@ Register Src="UserControls/FooBar.ascx" TagName="FooBar" TagPrefix="uc1" %> <uc1:FooBar id="FooBar1" runat="server"></uc1:FooBar>


        only two letters away from being an asset

        R Offline
        R Offline
        R Palanivel
        wrote on last edited by
        #3

        Ya but i created my user control through WebContolLibrary. so i created dll files through windows application with webControlLibrary.Because i want to use some windows form controls on my web page..please give me some idea related with this

        r_palanivel83 10:01 4 Jan '06

        N 1 Reply Last reply
        0
        • R R Palanivel

          Ya but i created my user control through WebContolLibrary. so i created dll files through windows application with webControlLibrary.Because i want to use some windows form controls on my web page..please give me some idea related with this

          r_palanivel83 10:01 4 Jan '06

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          Windows != Web You can't use Windows controls on a web page! :wtf::omg::rolleyes:


          only two letters away from being an asset

          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