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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:18:33+00:00 2026-05-16T04:18:33+00:00

When I add AutoPostback = True to my DropDownList (with OnSelectedIndexChanged) I get a

  • 0

When I add AutoPostback = True to my DropDownList (with OnSelectedIndexChanged) I get a System.ArgumentNullException: Value cannot be null.

My control looks like this:

<asp:DropDownList ID="dropdown" runat="server" AutoPostBack="true"  OnSelectedIndexChanged="dropdown_OnSelectedIndexChanged" />

And code to fill control:

    dropdown.Items.Add(new ListItem("Item 1", "1"));
    dropdown.Items.Add(new ListItem("Item 2", "2"));
    dropdown.Items.Add(new ListItem("Item 3", "3"));

Update

I get the error when adding an empty page with the following code too:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_dev_test_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:DropDownList AutoPostBack="true" ID="DropDownList1" runat="server" />
    </div>
    </form>
</body>
</html>
  • 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-16T04:18:34+00:00Added an answer on May 16, 2026 at 4:18 am

    Solved the problem. A component I was using inside my web.config was causing the problem. So I added another web.config in the same category as the page using the faulty component and that solved the problem. (as long as I don’t use AutoPostBack on that page ;))

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

Sidebar

Related Questions

I have the following mark-up: <asp:DropDownList ID=ddlTownships DataTextField=Name AutoPostBack=True AppendDataBoundItems=True DataValueField=Id runat=server OnSelectedIndexChanged=ddlTownships_SelectedIndexChanged> <asp:ListItem
I have a dropdownlist control on a page with AutoPostBack set to True. On
I have added DropDownList in ASP.net. <asp:DropDownList ID=DropDownList1 runat=server AutoPostBack=True OnSelectedIndexChanged=DropDownList1_SelectedIndexChanged > <asp:ListItem Text=Name
I have a page which contains the generated content. Page.aspx: <asp:DropDownList ID=cmbUsers runat=server AutoPostBack=True
I am annoyed with a problem I have repeater control in updatepanel like this.
I have an asp.net dropdown like this <asp:DropDownList width=95% ID=RessourceComposantes runat=server DataSourceID=Composantes DataTextField=Description DataValueField=ComposanteID>
function Add(a, b) { } If we call a javascript function like - onclick=Add(1)
I add this problem for quite some time when using NetBeans. Recently I add
There is a drop down list bind with datasource -> Called This DropDownList A
Currently I've created a ASP.Net page that has a dropdown control with autopostback set

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.