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. how to retain the value of the html textbox control when server side dropdownlist changes??

how to retain the value of the html textbox control when server side dropdownlist changes??

Scheduled Pinned Locked Moved ASP.NET
csharphtmlasp-netsysadminhelp
4 Posts 4 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
    dayakar_dn
    wrote on last edited by
    #1

    hi friends, fine and hope u so... in my asp.net page i having one server side dropdownlist and html Control textbox.When i am selecting item from dropdownlist,the value in the textbox is cleared why beacuse i used autopostback "true" for dropdownlist item.i want to retain the value of the textbox when i am selecting different items in the dropdownlist... note : i set EnableViewState="true" inthe dropdownlist ...it is only working if i used runat="sever" in the textbox control... can u plz help me to solve this prob????.. i am looking forward to hearing from u... bye..

    M S 2 Replies Last reply
    0
    • D dayakar_dn

      hi friends, fine and hope u so... in my asp.net page i having one server side dropdownlist and html Control textbox.When i am selecting item from dropdownlist,the value in the textbox is cleared why beacuse i used autopostback "true" for dropdownlist item.i want to retain the value of the textbox when i am selecting different items in the dropdownlist... note : i set EnableViewState="true" inthe dropdownlist ...it is only working if i used runat="sever" in the textbox control... can u plz help me to solve this prob????.. i am looking forward to hearing from u... bye..

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #2

      dayakar_dn wrote:

      note : i set EnableViewState="true" inthe dropdownlist ...it is only working if i used runat="sever" in the textbox control...

      So, why don't you use it as a server side control?

      dayakar_dn wrote:

      can u plz help me to solve this prob????..

      Another option is to store the value of the textbox somewhere and than again populate it after the postback.

      Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

      S 1 Reply Last reply
      0
      • M Manas Bhardwaj

        dayakar_dn wrote:

        note : i set EnableViewState="true" inthe dropdownlist ...it is only working if i used runat="sever" in the textbox control...

        So, why don't you use it as a server side control?

        dayakar_dn wrote:

        can u plz help me to solve this prob????..

        Another option is to store the value of the textbox somewhere and than again populate it after the postback.

        Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

        S Offline
        S Offline
        sarala s
        wrote on last edited by
        #3

        hi Manas Bhardwaj, i tried as u said.... i got the value of html textbox in the code behind page with the help of the following code... Request.Params["ComapanyName"]; how to populated back this value to the html textbox without using runat="server"...

        1 Reply Last reply
        0
        • D dayakar_dn

          hi friends, fine and hope u so... in my asp.net page i having one server side dropdownlist and html Control textbox.When i am selecting item from dropdownlist,the value in the textbox is cleared why beacuse i used autopostback "true" for dropdownlist item.i want to retain the value of the textbox when i am selecting different items in the dropdownlist... note : i set EnableViewState="true" inthe dropdownlist ...it is only working if i used runat="sever" in the textbox control... can u plz help me to solve this prob????.. i am looking forward to hearing from u... bye..

          S Offline
          S Offline
          Sandeep Akhare
          wrote on last edited by
          #4

          Use request object to get value of your html textbox and populates the control on every postbacks

          Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... " Check My Blog

          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