# ASP.NET - Object reference not set to an instance of an object

**URL:** <https://forum.kirupa.com/t/asp-net-object-reference-not-set-to-an-instance-of-an-object/256038>\
**Category:** Uncategorized\
**Created:** [March 29, 2008, 6:23pm UTC](https://forum.kirupa.com/t/asp-net-object-reference-not-set-to-an-instance-of-an-object/256038 "2008-03-29T18:23:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abdulmohsen](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@abdulmohsen](https://forum.kirupa.com/u/abdulmohsen)\
**Post date:** [March 29, 2008, 6:23pm UTC](https://forum.kirupa.com/t/asp-net-object-reference-not-set-to-an-instance-of-an-object/256038/1 "2008-03-29T18:23:52Z")

</div>

[SIZE=2]I have a code behind for my default.aspx page.[/SIZE]

[SIZE=2]I am using a databaind control ([SIZE=2][COLOR=#800000]RadioButtonList[COLOR=black]) for options a user would choose from.[/COLOR][/COLOR][/SIZE]

[SIZE=2][COLOR=#800000][COLOR=#000000]some where in the code, i have created a protected function in which i try to reference the list item value of my radio control the user has selected.[/COLOR][/COLOR][/SIZE]

[SIZE=2][COLOR=#800000][COLOR=#000000]when the page submits, i get the following error on this line:[/COLOR][/COLOR][/SIZE]

[FONT=Arial][COLOR=red]System.NullReferenceException: Object reference not set to an instance of an object.[/COLOR][/FONT]

Here’s the line that generates that error:  
[/SIZE]

```auto

userChoice = [SIZE=2][COLOR=#008080]Convert[/COLOR][/SIZE][SIZE=2].ToSByte(radioListContainer.SelectedItem.Value);[/SIZE]

```

I don’t know what i am missing or doing wrong?

Any help please?!

Many thanks
