asp.net - VB/SQL issue - Object reference not set to an instance of an object -


new user here , forum posts have been useful me in past. have problem beginning annoy me , wondering if guys can lend me hand!

my problem piece of code:

private sub drpuser_databound(byval sender object, byval e system.eventargs) handles drpuser.databound dim newlabel label newlabel = page.master.findcontrol("lbla") me.drpuser.items.findbyvalue(newlabel.text).selected = true end sub 

the server throws out 'object reference not set instance of object.' , references line 15, be: me.drpuser.items.findbyvalue(newlabel.text).selected = true

what don't when run debugger on workstation, code runs. pulls data server fine , identifies me. when change newlabel else, label2, give me object reference error , run fine.

but here's thing that's getting me. when switch label names , update server, error gives me references code still same old one! show newlabel when re-uploaded code renamed label2.

any thoughts? in advance...

you should use new keyword. code should

dim newlabel new label 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -