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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:08:44+00:00 2026-06-08T22:08:44+00:00

I am implementing geo-location table using SQL Server. I have added major country, states

  • 0

I am implementing geo-location table using SQL Server.
I have added major country, states and cities in database, but I want to allow adding values by selecting ‘Other‘ option in drop down. If I select ‘other‘ in country, then same option should be selected in state and city dropdowns. It should also show additional textboxes for each dropdown.
I am using asp.net 3.5, database is sql server 2008 using linq. Please help!!

  • 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-08T22:08:46+00:00Added an answer on June 8, 2026 at 10:08 pm

    After you fill your dropdowns with values from the database, you should add one more:’Other…’ with the value of ‘other’, it should be placed at the end of the lists.
    Also, you should place one hidden textbox for each dropdown:

    <asp:TextBox ID="txtState" runat="server" Style="display:none;"></asp:TextBox>
    

    On the client side, you can use jQuery or javascript to catch when user select this value. There should be three functions: ‘other country’ shows all three textboxes, ‘other state’ shows two and ‘other city’ shows only one:

    $('#countries').change(function() {
        var country= $("#states option:selected").text();
        if(country == 'other') {
            var country = $("#countries option:selected").val();
        if (country === 'other') {
            $("#states").val('other');
            $("#cities").val('other');
    
            $("#txtCountry").show();
            $("#txtState").show();
            $("#txtCity").show();
       }
       else {
           //if user select 'other' and later select something else, you should hide textbox
           $("#txtCountry").hide();
       }
    
    });
    

    In the same way, create functions for States and Cities.

    After this, at the code behind you can check if selected values are ‘other’, then use value from the textboxes. I hope you get the idea.

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

Sidebar

Related Questions

Implementing the SQL Server Session Provider by using aspnet_regsql. In Web Config <sessionState mode
Implementing a simple Login screen using JSF and Spring and Hibernate. I have written
When implementing a hash table using a good hash function (one where the probability
I`m implementing a custom filesystem on Ubuntu using Fuse, but I need to trap
implementing publishActivity in PHP using the REST API using this code: $activity = array(
Before implementing j_security_check using MySQL realm authentication in my web app. I had the
We are using reverse-geocoding in a rails webservice, and have run into quota problems
I'm implementing Google Maps service with PHP/CURL and currently have a problem with Maps
Implementing the basic algorithm using last array as a pivot in Java, is it
When implementing iterator using yield return , is there any difference between returning IEnumerator

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.