ispostback

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I make a checkbox true I want other textboxes to appear otherwise the
visible property of these textboxes is false. They will not appear unless
the checkbox has postback set to true. This causes another problem which is
the page reloads making the user start at the top and scroll down to where
they originally were.

How can I make the textboxes appear when the checkbox is checked and stay at
the same spot on the page?
 
You can store the control state in Session variables and then show/hide on
the reload accordingly.
 
Thank you Jeff. Could you give me an example that I could work off of like
Dim controlstate as string
controlstate=chkbox.viewstate
if page.ispostback then
controlstate.unhide
else
controlstate.hide
endif
 
When leaving
Session.item("check1") = chk1.checked

When entering
chk1.checked = Session.item("check1")
 
Back
Top