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. HTML Input Box Dynamically set default value

HTML Input Box Dynamically set default value

Scheduled Pinned Locked Moved ASP.NET
questionhtml
6 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.
  • D Offline
    D Offline
    dptalt
    wrote on last edited by
    #1

    I created a Web User Control that contains an HTML Input Box. On my web page I have added this Web User Control. In the page_load of the code behind of my web page how can I set a default value to the Input box?

    C R 2 Replies Last reply
    0
    • D dptalt

      I created a Web User Control that contains an HTML Input Box. On my web page I have added this Web User Control. In the page_load of the code behind of my web page how can I set a default value to the Input box?

      C Offline
      C Offline
      Coding C
      wrote on last edited by
      #2

      Set the value property of the input box in user control. Or do you want to set it at page load?

      Coding C# ExciteTemplate

      D 1 Reply Last reply
      0
      • C Coding C

        Set the value property of the input box in user control. Or do you want to set it at page load?

        Coding C# ExciteTemplate

        D Offline
        D Offline
        dptalt
        wrote on last edited by
        #3

        I want to set the value at page load.

        C 1 Reply Last reply
        0
        • D dptalt

          I created a Web User Control that contains an HTML Input Box. On my web page I have added this Web User Control. In the page_load of the code behind of my web page how can I set a default value to the Input box?

          R Offline
          R Offline
          Robert_Pan
          wrote on last edited by
          #4

          your html controller: > server page : UserController.somepublic=yourValue;

          R 1 Reply Last reply
          0
          • R Robert_Pan

            your html controller: > server page : UserController.somepublic=yourValue;

            R Offline
            R Offline
            Robert_Pan
            wrote on last edited by
            #5

            input type="Button" text=<%some public%>

            1 Reply Last reply
            0
            • D dptalt

              I want to set the value at page load.

              C Offline
              C Offline
              Coding C
              wrote on last edited by
              #6

              Create a public set property in the user control and then use it from main page to set the value in textbox.

              Coding C# ExciteTemplate

              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