c# - Object reference required for non static field -
i use inner html method render page put id name inside static method compilation error states object reference required non static field.
example
<div id="topicheader"> </div> code behind
topicgenerator.innerhtml += "<div class='topicgenspacing'><ul>"; this works find long dont place inside method.
is there way of overcoming problem?
regards
well, have pass topicgenerator parameter of static method.
or remove static keyword if method inside of class topicgenerator defined private field (for example).
Comments
Post a Comment