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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:19:20+00:00 2026-06-15T03:19:20+00:00

When using the following code, this error is returned: ‘rblPermisSejourA’ has a SelectedValue which

  • 0

When using the following code, this error is returned:
‘rblPermisSejourA’ has a SelectedValue which is invalid because it does not exist in the list of items.

<asp:RadioButtonList ID="rblPermisSejour" runat="server"
DataSourceID="EntityDataSourcePermisSejour" DataTextField="Libelle"
DataValueField="Id" AppendDataBoundItems="True" RepeatDirection="Horizontal">
<asp:ListItem Selected="True" Text="" Value="-1">Aucun</asp:ListItem>
</asp:RadioButtonList>

<asp:RadioButtonList ID="rblPermisSejourA" runat="server"
DataSourceID="EntityDataSourcePermisSejour" DataTextField="Libelle"
DataValueField="Id" AppendDataBoundItems="True" RepeatDirection="Horizontal">
<asp:ListItem Selected="True" Text="" Value="-1">Aucun</asp:ListItem>
</asp:RadioButtonList>

protected void ws2_OnDeactivate(object sender, EventArgs e)
{
  rblPermisSejourA.SelectedValue = rblPermisSejour.SelectedValue;
}

Note that “rblPermisSejour” is in a wizard step and “rblPermisSejourA” in another wizard step that is not yet activated (no id and no title for the step in witch there is the “rblPermisSejourA”). When this step is activated, all is working well.
But with the same code and same operation with another RadioButtonList it’s working very well and this within the same context (wizard step not activated).

  • 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-15T03:19:21+00:00Added an answer on June 15, 2026 at 3:19 am

    This is THE solution:

    if (rblPermisSejourA.Items.Count <= 1)
        rblPermisSejourA.DataBind(); //added to correct the bug
    rblPermisSejourA.SelectedValue = rblPermisSejour.SelectedValue;

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

Sidebar

Related Questions

I am using the code as described in this question. However get following error
I have implemented an error style for textboxes using the following code. This sets
i am using the following code(based on this http://goo.gl/5HhSx ) to calculate the difference
I am using following code to show a spinning wheel: $(#loading) .hide() .ajaxStart(function(){ $(this).show();
I am using following code to get bitmap from url. This function is used
I'm using following code but cannot return data from MySQL. This is the output:
To use custom layout file in my app I'm using this following code, set
I am using the following code to generate excel from sql through php.this is
Hi I found the following code from this page JQuery UI DatePicker using 2
I am using the following code snippet to calculate a total price. This 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.