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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:10:45+00:00 2026-05-26T06:10:45+00:00

i am developing a website using asp.net 3.5.i have created a cascading dropdownlist for

  • 0

i am developing a website using asp.net 3.5.i have created a cascading dropdownlist for country,state,and city.I am filling the state and city using jquery and web service.

But on page submit i am not able to get the selected value of state and city.it is returning blank.

on page load i am using this.

ListItem stateitem = new ListItem();
stateitem.Text = "Select";
stateitem.Value = "0";
dd_State.Items.Insert(0,stateitem);

I am using jquery and webservice to bind the state and city based on state.

on save button event i am getting the value as.

obj.StateId = Convert.ToInt32(dd_State.SelectedItem.Value);

onj.CityId = Convert.ToInt32(dd_City.SelectedItem.Value);

thanks in advance.

  • 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-26T06:10:45+00:00Added an answer on May 26, 2026 at 6:10 am

    Since you are adding the values client-side, the page won’t know about those values because they were not generated from code-behind. This means that on each postback the dropdown will be restored from viewstate as empty so it has no item to mark as selected.
    You have at least two options:

    1. Lookup the selected value in the Form variables (the selected value is however sent to the server as a common POST behaviour)
    2. Use a hidden field in which you store the selected value via script in the onchange event of the dropdown
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using ASP.NET MVC for developing a web site. I am using jquery
I have an asp.net c# website I'm developing with Visual Web Developer Express Edition
I'm developing a website (using asp.net-mvc) with a SqlServer 2005 database. I have numerous
TGIF, I have a website I'm developing which is using ASP.NET masterpage/sitemap/content pages setup.
I'm developing a website in ASP .NET MVC 2 using C#. I have a
I'm developing a website (using asp.net by the way) and I'm having a problem
I've been developing a simple website using asp.net MVC and I'm starting to add
I'm developing an website using asp.net mvc with MySQL and I need to make
We are developing a web application using asp.net and sql server. We are required
I am developing an asp.net website using typed dataset as DAL , everything works

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.