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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:46:57+00:00 2026-05-22T17:46:57+00:00

I already retrieved my database(DescriptionCode) on dropdownlist inside on a repeater. Now, I’m trying

  • 0

I already retrieved my database(DescriptionCode) on dropdownlist inside on a repeater.

Now, I’m trying to save/add/insert on my database the selected value of dropdownlist but i

failed.

Any assistance gratefully received. Thanks!

 protected void GeneralRepeater_OnItemDataBound(object sender,
                                               RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item ||
            e.Item.ItemType == ListItemType.AlternatingItem)
        {
            DropDownList myDDL = (DropDownList)e.Item.FindControl("GeneralDDL");
            Diagnosis oDiagnosis = new Diagnosis();
            PlanOfCare oPlanOfCare = new PlanOfCare();
            DataView dv = new DataView(oDiagnosis.GetDiagnosis());
            myDDL.DataSource = PatientDiagnosis1;
            myDDL.DataTextField = "DiagnosisCode";
            myDDL.DataValueField = "DiagnosisCode";
            myDDL.DataBind();

            //PUT AN EMPTY FIELD FOR DROPDOWNLIST
            ListItem LI = new ListItem("", "");
            myDDL.Items.Insert(0, LI);
            myDDL.SelectedValue = "0";



        }
    }


 protected void cmdSave_Click(object sender, EventArgs e)
    {
    oPlanofCareSave.DiagnosesCode = //[1]this must the selected value of dropdownlist inside of repater
    PlanSave(ooPlanofCareSave);
}
  • 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-22T17:46:58+00:00Added an answer on May 22, 2026 at 5:46 pm
    DropDownList myDDL = (DropDownList)GeneralRepeater.Items[indexvalue].FindControl("GeneralDDL");
    
    oPlanofCareSave.DiagnosesCode = myDDL.SelectedValue;
    

    it is easy to do it like that

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

Sidebar

Related Questions

I already know the obvious answer to this question: just download <insert favorite windows
Greetings, stack overflow In my database, I already have one table, 'contacts' that contains
The data stored in unicode (in database) has to be retrieved and convert into
I'm having a problem trying to add an object to an object context in
I'm doing module to save and retrieve images using SQL server database 2008 and
Greetings fellow earthlings. I'm researching methods of caching data retrieved from various database tables
I have two entity lists being retrieved from the database they are using the
I have already created a report using list of data from my database. i
I am trying to get some data out from a database stored as text
I am looking to store the database values which are already stored as id's

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.