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

  • Home
  • SEARCH
  • 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 7797721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:46:31+00:00 2026-06-01T23:46:31+00:00

I am trying ot use C# / ASP.NET to pull a date from an

  • 0

I am trying ot use C# / ASP.NET to pull a date from an Oracle Database and if the date is later than a certain day, hide a section of a form. The problem is, normally when I have been using a div runat=server to call from within ASP.NET I can just say CONTROLID.Visible=true and it works.

For some reason this form when run is prepending “mainContent_”, the ContentPlaceHolderID of the form plus an underscore, to any DIV’s run at the server. This means my CONTROLID is then renamed to mainContent_CONTROLID and is not shown.

How do you prevent this?

  • 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-06-01T23:46:32+00:00Added an answer on June 1, 2026 at 11:46 pm

    This is because the PlaceHolder is an INamingContainer. ASP.NET, by default, builds a unique client ID based on the naming container hierarchy.

    Use control.ClientID in your client script or change the ClientIDMode to Static.

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

Sidebar

Related Questions

I'm trying to use jQuery to get data from an ASP.NET web service (SharePoint
I'm trying to use ASP.net health monitoring to log unhandled exceptions from an asmx
I am trying to use ASP.NET forms authentication functionality but it is not possible
I'm trying to use ASP.net profiles I've followed some instructions which means I have
I'm trying to use Asp.NET WebAPI module but I get a weird error. When
Im trying to use the asp.net menucontrol but sadly without any luck. Here is
I'm trying to use the ASP.NET chart controls for a website that is localised
I am trying to use the ASP.NET Web API Self-Host option with Windows authentication
I was trying to use RoR or ASP.NET MVC but at my first impression
I'm trying to use the new ASP.NET Web API to do the following: A

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.