473,385 Members | 1,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ispostback

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?
Nov 10 '06 #1
3 1042
You can store the control state in Session variables and then show/hide on
the reload accordingly.
"bindurajeesh" <bi**********@discussions.microsoft.comwrote in message
news:CF**********************************@microsof t.com...
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?

Nov 10 '06 #2
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

"Jeff Allan" wrote:
You can store the control state in Session variables and then show/hide on
the reload accordingly.
"bindurajeesh" <bi**********@discussions.microsoft.comwrote in message
news:CF**********************************@microsof t.com...
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?


Nov 10 '06 #3
When leaving
Session.item("check1") = chk1.checked

When entering
chk1.checked = Session.item("check1")
"bindurajeesh" <bi**********@discussions.microsoft.comwrote in message
news:C0**********************************@microsof t.com...
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

"Jeff Allan" wrote:
>You can store the control state in Session variables and then show/hide
on
the reload accordingly.
"bindurajeesh" <bi**********@discussions.microsoft.comwrote in message
news:CF**********************************@microso ft.com...
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?



Nov 14 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tim | last post by:
To make !Page.IsPostBack to work, do I need to set any properties at page level or in the config files(Web, machine) or aspx files. Because code in under the !IsPostBack is executing twice and...
2
by: patrick_a | last post by:
Hi, I'm having trouble with using !IsPostBack. I want to create a linkbutton within a table when the page loads the first time and then have the page redirect based on the...
3
by: Alan Pretre | last post by:
I have a a WebForms.Table control that I am populating in Page_Load(). One of the columns has cells with a button in each row, which I wire up to its Click event handler. Everything is fine if I...
2
by: Pravin | last post by:
Hi, I have a doubt that how does ASP.NET find out whether the page is accessed for the first time or the page is due to a post back event, and then set the IsPostBack property ? Any ideas. ...
2
by: Anand Sagar | last post by:
I have a Panel1 and button1 on my webform. At runtime, I create 2 textboxes. I do it at the Page_Load event. I put the code within the " If Not isPostBack" For the button click event, I will do...
4
by: TJ | last post by:
Hi, There is one aspx web page that contains usercontrol. In aspx page and usercontrol , there is each submit button... Here is what I want... I want to process something depending on each...
6
by: RA | last post by:
btnAdd_Click does not get hit; if I have IsPostBack check in Page_load. If I don't have IsPostBack check; I am able to debug through btnAdd_Click. If I don't look for IsPostBack then it...
5
by: David Lozzi | last post by:
Hello, I have an interesting issue, so bear with me as I try to explain. I have a datalist posing as tabs for my application. And as each tab is clicked, a placeholder is then populated with the...
0
by: DC | last post by:
Hi, I am dynamically adding a usercontrol that uses "this.IsPostBack" in Page_Load to decide whether it must populate some of it's inner controls or not. Since I am adding the usercontrol to the...
5
by: BM | last post by:
I have a question that seems like it should have a simple answer, but I can't seem to find it by searching... Anyway, I'm trying to capture the IsPostBack event when I select an item within an...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.