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 Controls

User Controls

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netwinformstutorialquestion
3 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.
  • B Offline
    B Offline
    Brendan Vogt
    wrote on last edited by
    #1

    Hi, Please look at www.sahometraders.co.za. I have to do the website in ASP.NET, and I want to get started with the top menu. People say that I must use a user control for this. I'm not entirely sure how to do this. I will be using C#. COuld someone please send some sample code, or give me a link where I can download some good sample code on how to create this type of control. Any links to other good articles will be appreciated. When will I use user controls? People say I must use a an includes files, so if I were to use an include file in the old ASP, would I then just have to create a user control every time? BRENDAN

    R M 2 Replies Last reply
    0
    • B Brendan Vogt

      Hi, Please look at www.sahometraders.co.za. I have to do the website in ASP.NET, and I want to get started with the top menu. People say that I must use a user control for this. I'm not entirely sure how to do this. I will be using C#. COuld someone please send some sample code, or give me a link where I can download some good sample code on how to create this type of control. Any links to other good articles will be appreciated. When will I use user controls? People say I must use a an includes files, so if I were to use an include file in the old ASP, would I then just have to create a user control every time? BRENDAN

      R Offline
      R Offline
      R Thomas 0
      wrote on last edited by
      #2

      I think you care too much about what ppl say than to find out on your own.;) anywho, IMHO, you should read up on user controls, user controls are usually good for static content, for more advanced usage you can always take a look at the mighty server controls. As for examples you can google for it. As for including the file, in user controls all you have to do is to put a user control onto your file so that at the page rendering time, asp.net can render it for you.. HTH... "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18

      1 Reply Last reply
      0
      • B Brendan Vogt

        Hi, Please look at www.sahometraders.co.za. I have to do the website in ASP.NET, and I want to get started with the top menu. People say that I must use a user control for this. I'm not entirely sure how to do this. I will be using C#. COuld someone please send some sample code, or give me a link where I can download some good sample code on how to create this type of control. Any links to other good articles will be appreciated. When will I use user controls? People say I must use a an includes files, so if I were to use an include file in the old ASP, would I then just have to create a user control every time? BRENDAN

        M Offline
        M Offline
        minhpc_bk
        wrote on last edited by
        #3

        Brendan Vogt wrote: COuld someone please send some sample code, or give me a link Have a look at some articles below that will give you some ideas on how to make a page template: http://authors.aspalliance.com/PaulWilson/Articles/?id=14[^] http://www.codeproject.com/aspnet/PageFramework.asp[^] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspnet-simulatinginclude.asp[^] Surely, there are a number of resources available out there. Brendan Vogt wrote: When will I use user controls? In addition to the controls available to developers in the Toolbox, you also can use custom controls to encapsulate key aspects of user interface and program logic that you want to reuse throught out your application. Basically, there are three types of custom controls: Web User Control, Composite Control, and Template Control ( or Rendered Control). Web User controls reside in content files which have the .ascx extension, so they must be included in the application that you want to use. Both composite and template controls can be compiled and persisted as an assembly, so they can be shared between multiple applications. For more information see Developing ASP.NET Server Controls[^]

        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