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. UserControl....

UserControl....

Scheduled Pinned Locked Moved ASP.NET
cssquestion
3 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.
  • J Offline
    J Offline
    john kuruvila
    wrote on last edited by
    #1

    hii, I am having one user control containing grid.where should i write the code for that grid...in that user control or in the web page..? Jijo kuruvila software developer trivandrum

    D 1 Reply Last reply
    0
    • J john kuruvila

      hii, I am having one user control containing grid.where should i write the code for that grid...in that user control or in the web page..? Jijo kuruvila software developer trivandrum

      D Offline
      D Offline
      DavidNohejl
      wrote on last edited by
      #2

      hi, john kuruvila wrote: .where should i write the code for that grid...in that user control or in the web page..? When you choosed to include grid as a part of user control, so I guess it logically belongs to that control. So, from OOP, you shouldn't directly expose that grid to others => you shouldn't write code for grid in the page. It probably should be internal thing for your control. Sometimes (when you are sure you know what you are doing), it's good to have direct access to members, that's why internal modifier is here (allows access to this member from same assembly). Say, you have Calendar control, you don't want (control's) user to insert letters instead of numbers, right? By writing checks in public methods, you assure yourself that input will be allways correct, and control's data will be consistent. So, answer is: write code for grid in user control :-D Do you know what I mean? best regards, David 'DNH' Nohejl Never forget: "Stay kul and happy" (I.A.)

      J 1 Reply Last reply
      0
      • D DavidNohejl

        hi, john kuruvila wrote: .where should i write the code for that grid...in that user control or in the web page..? When you choosed to include grid as a part of user control, so I guess it logically belongs to that control. So, from OOP, you shouldn't directly expose that grid to others => you shouldn't write code for grid in the page. It probably should be internal thing for your control. Sometimes (when you are sure you know what you are doing), it's good to have direct access to members, that's why internal modifier is here (allows access to this member from same assembly). Say, you have Calendar control, you don't want (control's) user to insert letters instead of numbers, right? By writing checks in public methods, you assure yourself that input will be allways correct, and control's data will be consistent. So, answer is: write code for grid in user control :-D Do you know what I mean? best regards, David 'DNH' Nohejl Never forget: "Stay kul and happy" (I.A.)

        J Offline
        J Offline
        john kuruvila
        wrote on last edited by
        #3

        hii dnh, Thank You...:-D Jijo kuruvila software developer trivandrum

        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