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. when i refresh the webpage i want to keep the value i inputed

when i refresh the webpage i want to keep the value i inputed

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

    hi..i when i refresh the webpage i want to keep the value i inputed in the textbox,when the page reload the value i have inputed before can display automatically I try my best!

    K 1 Reply Last reply
    0
    • Y yangchengmin

      hi..i when i refresh the webpage i want to keep the value i inputed in the textbox,when the page reload the value i have inputed before can display automatically I try my best!

      K Offline
      K Offline
      killerslaytanic
      wrote on last edited by
      #2

      Hello: I will assume the refresh you are talking about is not that one you make on the explorer pressing F5 or pressing the toolbar refresh button , but is a postback instead caused by clicking in some control you previously put in the page (as a button for example) If it is that "F5 refresh" then forget it... the value will get lost as the page is re-initialized again it is like restore it´s "last known state" for saying it in some way Now if we are talking about a postback then can be happening 3 things 1. You are using a Text Field from the HTML palette...Solution, rightclick it and select "Run at Server" 2. You are using a TextBox from the WebForms palette but the EnableViewState is set to false (which is strange ´cause it is true by default). Set it to true. 3. Case 2 with EnableViewState=true but the Page is who has the EnableViewState=false. In the Property browser select DOCUMENT and set EnableViewState= true If it´s not one of these i have no idea ... put the html code here to take a look at it

      Y 1 Reply Last reply
      0
      • K killerslaytanic

        Hello: I will assume the refresh you are talking about is not that one you make on the explorer pressing F5 or pressing the toolbar refresh button , but is a postback instead caused by clicking in some control you previously put in the page (as a button for example) If it is that "F5 refresh" then forget it... the value will get lost as the page is re-initialized again it is like restore it´s "last known state" for saying it in some way Now if we are talking about a postback then can be happening 3 things 1. You are using a Text Field from the HTML palette...Solution, rightclick it and select "Run at Server" 2. You are using a TextBox from the WebForms palette but the EnableViewState is set to false (which is strange ´cause it is true by default). Set it to true. 3. Case 2 with EnableViewState=true but the Page is who has the EnableViewState=false. In the Property browser select DOCUMENT and set EnableViewState= true If it´s not one of these i have no idea ... put the html code here to take a look at it

        Y Offline
        Y Offline
        yangchengmin
        wrote on last edited by
        #3

        Thanks i want to use "F5 refresh" ,so i have forgotten it :) I try my best!

        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