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. General Programming
  3. C#
  4. Control conditions flows

Control conditions flows

Scheduled Pinned Locked Moved C#
tutorial
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.
  • G Offline
    G Offline
    GermanDM
    wrote on last edited by
    #1

    Hi, Mmm wasnt sure what to put in the subject lol anyways, Im busy with a web app and one of my pages contain quite a few controls for input. There are a few conditions of when certain controls need to be visible or not. Can anyone please give me some advice or suggestions on how to write proper code in working with conditions in this situation instead of hardcoding everything in a messy way. Please let me know if I didnt explain properly. Thanks

    V D 2 Replies Last reply
    0
    • G GermanDM

      Hi, Mmm wasnt sure what to put in the subject lol anyways, Im busy with a web app and one of my pages contain quite a few controls for input. There are a few conditions of when certain controls need to be visible or not. Can anyone please give me some advice or suggestions on how to write proper code in working with conditions in this situation instead of hardcoding everything in a messy way. Please let me know if I didnt explain properly. Thanks

      V Offline
      V Offline
      Vikram A Punathambekar
      wrote on last edited by
      #2

      This is not the web dev forum, but you can set the Visible property of your control to false and true as you please.

      Cheers, Vıkram.


      After all is said and done, much is said and little is done.

      1 Reply Last reply
      0
      • G GermanDM

        Hi, Mmm wasnt sure what to put in the subject lol anyways, Im busy with a web app and one of my pages contain quite a few controls for input. There are a few conditions of when certain controls need to be visible or not. Can anyone please give me some advice or suggestions on how to write proper code in working with conditions in this situation instead of hardcoding everything in a messy way. Please let me know if I didnt explain properly. Thanks

        D Offline
        D Offline
        Dave Sexton
        wrote on last edited by
        #3

        Will the conditions be known only at runtime? I recently finished working on web app that needed to be used by different companies with specific controls that could be visible depending on who the company was. The route chose was to create an xml file using control "id" & "visible" as fields. Before rendering the page I call on the xml, loop through the controls collection & set their visible properties. Bit of an ugly hack but it works pretty well.


        I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.

        • • •

        But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson

        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