Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7606647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:27:45+00:00 2026-05-31T00:27:45+00:00

Here are my buttons: <asp:Button ID=PreviousButton CssClass=previous-button button Text=Previous Visible=false OnClick=PreviousButton_Click runat=server /> <asp:Button

  • 0

Here are my buttons:

<asp:Button ID="PreviousButton" CssClass="previous-button button" Text="Previous" Visible="false" OnClick="PreviousButton_Click" runat="server" />
<asp:Button ID="NextButton" CssClass="next-button button" Text="Next" Visible="false" OnClick="NextButton_Click" runat="server" />

During Page_Init this code is executed:

NextButton.Visible = bNextEnabled;
PreviousButton.Visible = bPreviousEnabled;

Both bNextEnabled and bPreviousEnabled are True at this point.

At the end of Page_Init Response.Write(NextButton.Visible.ToString()) is True.

At the end of Page_Init Response.Write(PreviousButton.Visible.ToString()) is True.

—

At the start of Page_Load Response.Write(NextButton.Visible.ToString()) is False.

At the start of Page_Load Response.Write(PreviousButton.Visible.ToString()) is True.

I’ve extrapolated the code for the buttons but I’ll provide anything else that might be pertinent, though I have no idea what that might be as yet.

At no other point on the page is the Visible property for either button altered. The page where the buttons stop working is a postback. The page prior to the postback both buttons are set to Visible = false though I can’t imagine how this would effect things.

So what’s happening here? Both buttons use exactly the same code and yet one works as expected and the other doesn’t..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T00:27:46+00:00Added an answer on May 31, 2026 at 12:27 am

    It’s most likely related to the settings for the property getting saved into ViewState. That’s the only thing between Init and Load that might have an effect on the control properties such as this (as far as I can tell). Init fires before the values from ViewState have been loaded and before ViewState tracking has been turned on, so it’s possible you change it there and then it gets overwritten when the ViewState gets loaded.

    If there’s a reason you can’t set these properties in the Load event instead of Init, you could try using the PreLoad event instead.

    Here’s a good reference for the page lifecycle and what’s happening when.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to call multiple functions on button click event? Here is my button, <asp:LinkButton
I am trying to add Become-a-Fan button to my 2008 asp.net website (vb) Here
I have an Asp.Net button and I am applying flick theme to my buttons
Here is my setup: I have an asp.net button on a page -- <asp:Button
I have a menu bar that is rotated slightly. Here are two buttons as
Here's the scenario: I have a set of buttons that I want to bind
Here is my working page . I attached buttons to white bishop and you
Whats wrong with my buttons? here http://hiddenbrookstudio.com/index.swf , see how they rollover and dissappear
first time posting here. I'm using a loop to create 3 buttons, but my
Here is the code for the button click event; Protected Sub CompetenciesButton_Click(ByVal sender As

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.