2 Answers
2

Your code should look like below, its a base class that the webpart calls.... in the base class im setting the webpart settings, Iv made a custom one for you where you will see it in the properties of the webpart when you edit the webpart.

You're suggesting just moving the backing variable deceleration around a bit? Really? Maybe he just didn't have his lucky red socks on when compiling ;)
–
RyanAug 21 '12 at 13:06

See, I saw that and hoped that there was another bit of code sneakily put in somewhere that I didn't see. But I prefer the lucky red socks idea :)
–
James LoveAug 21 '12 at 13:36

Thx for replying. If I remove the static, I received an error. The thing is, that I have the property in the VisualWebPart1.cs File and want to use the values in the VisualWebPart1.ascx.cs File. THE Error: An object reference is required for the non-static field, method, or property 'VisualWebPart1.VisualWebPart1.VisualWebPart1._hello'
–
grekkoAug 22 '12 at 7:10