asp.net - variable is not declared it may be inaccessible due to its protection level -


my vb skills not best, , problem has had me stumped few days.

in list of controls shown in visual studio not defined in code behind, can "mouseover" them , tooltip text pops right up.

popup

errors

screenshot

similar questions:

this 1 had no solution - 'var_name'is not declared. may inaccessible due protection level.' in debug mode

this 1 said solution in web.config, don't understand where/how - bc30451: 'mailvalidation' not declared. may inaccessible due protection level

this 1 misspelled word - vb.net error: inaccessible due protection level

update - here problem might clue problems are:

in tools.vb module, have class access ldap.

the namespace tools class given in login.aspx.vb code, yet login code not recognize tools class.

missing tools

pay close attention first part of error: "variable not declared"

ignore second part: "it may inaccessible due protection level". it's red herring.

some questions... (the answers might in image posted, can't seem make larger , eyes don't read small of print... chance can post code in way these older eyes can read it? makes hard know total picture. in particular suspicious of page directives.)

we know 1streasontypes listbox, reason seems don't know listbox. why want see page directives.

but also, how calling private method formrefresh()? it's not event handler, makes me wonder if trying reference listbox in form not handled in code behind.

you may need find control 1streasontypes. try maybe putting listbox inside

<div id="myformdiv" runat="server">.....</div> 

then in formrefresh(), a...

dim 1streasontypesnew listbox = myformdiv.findcontrol("1streasontypes") 

or use existing control, object, or page instead of div. more info on findcontrol: http://msdn.microsoft.com/en-us/library/486wc64h(v=vs.110).aspx

but no matter how slice it, there funky going here such 1streasontypes doesn't know exact listbox it's supposed be.


Comments

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -