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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:58:43+00:00 2026-05-24T01:58:43+00:00

i need to fill dropdownlist and use its selected value in inline code to

  • 0

i need to fill dropdownlist and use its selected value in inline code to fill href of menu items .

example : i have DropCountry and fill it from DB then i get the location of client and set the selectedindex with this value , so i want to set href of menuitem with Query string of CountryID taken from dropCountry.selectedValue.

but he compile the inline Code before Codebehind :S

"Details.aspx?AdID=<%# DataBinder.Eval(Container.DataItem, "AdID")%>&CatID=<% Response.Write(GetIDCatFromQueryString()); %>&Country=<% i need to get value here %>"
  • 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-24T01:58:44+00:00Added an answer on May 24, 2026 at 1:58 am

    Here is my solution for you:

    I suspect that you are binding the menu item with datasource so the databinding of the menuitme happens before the page load where you have set the drop down list items and selected one of them so i suggest that in your page load, make the steps as following:

    1. Fill the drop down list with data
    2. Select the item from the drop down list
    3. Make the menu item binding

    OR

    You can fill the drop down list and select an item in the Page_OnInt event.

    In Both cases you have to update you code by adding <%# YourDropDownList.SelectedValue %>

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

Sidebar

Related Questions

I need to fill a multidimensional array and here is my code I have
I need to fill textboxes depending on the item selected in a combobox. I
For example, I need to fill lots of DataTables with SQLDataAdapter's Fill() method: DataAdapter1.Fill(DataTable1);
I have two fields that need to multiply each other and fill a third
I have a combobox in a dialog box form. I need to fill this
I need to fill a object using jQuery I have a dialog (jQueryUI) that
I have a list that I need to fill using a JSON collection of
I have table which is filled from external application. I need to fill column
I need to fill a dropdownlist with values from a settings table in a
I have a dropdownlist to fill in server-side an some of the options that

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.