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

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -