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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:52:22+00:00 2026-05-19T15:52:22+00:00

I am facing a new kind of problem. I am using the jQuery to

  • 0

I am facing a new kind of problem.

I am using the jQuery to fill the state dropdown on the change of country dropdown and the code of the jquery is on a js file so i bind the static client id like ct100_ddlCountry, this is working properly on the localhost but when i host this website to web server it not working because the client generating on the server is _ct100_ddlCountry.

Please tell me something if anyone has an idea about this. I am new to this kind of problem.

Thanks to all.

  • 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-19T15:52:23+00:00Added an answer on May 19, 2026 at 3:52 pm

    If you can’t upgrade to .NET 4.0 for clean id’s, I wrote a small lib and shoved it on CodePlex to serialize controls to a JSON array on the client.

    http://awesomeclientid.codeplex.com/

    http://www.philliphaydon.com/2010/12/i-love-clean-client-ids-especially-with-net-2-0/

    It serializes the controls and outputs some JavaScript like:

    <script type=”text/javascript”>
    //<![CDATA[
    var controls = {
    "txtUserName": "ctl00_ContentPlaceHolder1_txtUserName",
    "txtEmail": "ctl00_ContentPlaceHolder1_txtEmail",
    "btnSubmit": "ctl00_ContentPlaceHolder1_btnSubmit"
    };
    //]]>
    </script>

    Which then allows you to access controls like:

    <script type=”text/javascript”>
    //<![CDATA[
    var element = document.getElementById(controls.btnSubmit);
    //]]>
    </script>

    No need to write spaghetti code 🙂

    Edit: Alternatively, you can use jQuery selectors to do something like:

    var control = $('[id*=txtEmail]');

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

Sidebar

Related Questions

hi im new to jquery and im facing these problem i have these code
I'm kind of new to JavaScript and jQuery and now I'm facing a problem:
I am new to Android development and facing a problem while using AndEngine. I
Brand new to android and facing a weird problem.Check out the code below FirstActivity.java:
I'm new to jQuery and am facing now a weird problem. I succeeded to
I'm new to WPF, facing a problem in locating an image file on a
im new to android gaming and started andengine and facing problem while using createTiledFromAsset
I am new to MVC and facing one issue. I have a xml file
I am facing some problems for using placement new for contiguous memory.Please guide me,
I am new to struts 2. I am facing problem in filling Select tag

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.