Last post Oct 10, 2013 04:26 PM by nvielbig
Oct 08, 2013 05:27 PM|nvielbig|LINK
I am not a vb.net user, but the code I'm maintaining here is in vb.net. Sorry for probably posting something that's been asked a 1,000 times (I have looked at manythreads on sites with people running into my issue, and nothing has helped).
Here's my situation, and also what I have tried/looked at to no avail:
In my .aspx page, I call a variable from behind like so
<td><% = tobeOutput %></td>
This variable is declared in the .vb file like so
Partial Class classname
Private StopProcess As Boolean = False
Public tobeOutput As String
Now here's where things get weird, and my lack of vb debugging keeps me dead in my tracks. This error only shows up if I have the .aspx page currently open in visual studio. If that page is closed then I am able to build and launch to Chrome, without any problems (my guess is that there error is still there once that variable is called by the code...).
is used on more than one .aspx/.vb page -- is there something that would cause conflict here if they are reaching eachother? I don't think these classes are able to do that because they aren't declared public (sorry if that's not correct).
Again, sorry for a big wall of text, but I wanted to try and give you as much information as possible. Anything truly helps me, or if you have some references for me to check, that's very helpful as well.
Thank you so much,
PS - I will not be able to respond to any replies until 10/9 at 8:00am US Central Time ..... Thanks!
Oct 09, 2013 06:09 AM|sumitjain231|LINK
you need to use public keyword before Partial
Class classname. that will resolve the issue.
if that doesnt solve the problem please paste your aspx and aspx.vb file both.
Oct 09, 2013 06:25 AM|smirnov|LINK
True, the class need to be marked as public, in the same way as it is in c#.
Also, tobeOutput could be marked as protected instead of being public.
Hope this helps.
Oct 10, 2013 04:26 PM|nvielbig|LINK
Sorry about my late reply. Thanks for your responses! I chose to use Protected here as the variable is used in several different code behind files. I don't know why it didn't work originally when I made it Protected, but now it does.