I cannot see anything which can be wrong with ASP.NET specifically. I think your problem is incorrect or incomplete reporting of the problem. I should remind you that you can run your project under debugger even in ASP.NET.
Your code is incomplete and looks not very good. Here is what I see:
1) What's the purpose of the class
C
? This code would fit well as a member of
Thing
.
2) You by reference parameter makes no sense at all. What's the return parameter for? You use
void
return anyway. Why?! Should be:
public Thing foo(string s)
{
thing = new Thing();
thing.x = blah(s);
return thing;
}
3) Instead of having the method
blah
(are you really using such cheesy names :-)?), you should better make it a constructor of
Thing
.
4) If
blah
is not using "
this
", it should be static, as well as
foo
. If there is nothing else if
C
, it should be a static class.
5) The method
foo
should throw exception. Not every string
s
could be interpreted as English numeric, right?
I would say you're not comfortable enough in simple programming tasks to go if for ASP.NET. At the same time, I cannot see anything specific to ASP.NET which can be "specifically" wrong here. Maybe, you need to show more if your code — you're maybe doing something wrong in other part of the code, something I cannot even imagine…
—SA