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 200151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:05:12+00:00 2026-05-11T17:05:12+00:00

I am working on a webpage and at some point I need to disable

  • 0

I am working on a webpage and at some point I need to disable a asp:button.

This page uses a css file that has the following class:

.pagerLinkDisabled
{
    display: none;
}

So every time I set a button to disabled .net renders it with class="pagerLinkDisabled" and the button is not displayed…

At pageload I tried this:

myButton.Enabled=false;
myButton.Style.Add("display","static");

How can I work around this problem without changing the css file?

Thanks 🙂

Edit:

To clarify:

  • The button is being rendered but when enabled is set to false the framework is adding class=”pagerLinkDisabled” to the input tag.

  • This class is defined at a css file that I cannot change.

Edit2:

My button is defined as such:

<asp:Button runat="server" ID="myButton" Text="mytext" Enabled="false" />

The html that is being rendered is:

<input type="submit" name="ctl00$ContentPlaceHolder$ctl00$myButton" value="mytext" id="ctl00_ContentPlaceHolder_ctl00_myButton" class="pagerLinkDisabled" />
  • 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-11T17:05:12+00:00Added an answer on May 11, 2026 at 5:05 pm

    Can you not just edit the HTML Source so that the button does not use that class?

    Or is it defines at a higher level within with HTML? e.g. At the BODY tag.

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

Sidebar

Related Questions

I am working on an ASP web page that handles file uploads. Only certain
Currently I am working on a web page that has six ReportViewer controls that
I'm working on a web page where I'm making an AJAX call that returns
I am working on a web page that is using jQuery. I have an
I'm working on updating a classic ASP web page used by a number of
I'm attempting to get my first ASP.NET web page working on windows using Mono
Today I was working on a tab navigation for a webpage. I tried the
Working with a SqlCommand in C# I've created a query that contains a IN
I am trying to run some JQuery script on a particular page but only
Somewhat similar to this question , except we haven't decided that we're going with

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.