For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > May 2007 > Listbox inside a Gridview gives a nullpointer exception









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Listbox inside a Gridview gives a nullpointer exception
Smita

2007-05-30, 7:10 pm

I have a gridview, and a listbox which has a different datasource. The
listbox contains distinct types of contacts, whereas the gridview will get
populated upon contact type selection.

The data is displayed but when on submission of the contact type from the
list box i get a null reference exception.

I already tried to trap using SelectedIndex -1 but that does not work..

Any pointers.

Thanks in advance


Alexey Smirnov

2007-05-31, 4:23 am

On May 30, 10:34 pm, Smita <S...@discussions.microsoft.com> wrote:
> I have a gridview, and a listbox which has a different datasource. The
> listbox contains distinct types of contacts, whereas the gridview will get
> populated upon contact type selection.
>
> The data is displayed but when on submission of the contact type from the
> list box i get a null reference exception.
>
> I already tried to trap using SelectedIndex -1 but that does not work..
>
> Any pointers.
>
> Thanks in advance


Please send a piece of code where you get the exception.
Thanks!

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com