I'm using Web Helpers in an asp.net Razor app. To show some Twitter content (Tweets), all I have to do is call Twitter.Profile("jQuery").
As great as jQuery is, though, I want to be able to replace that arg with another dynamically. So, in an element with the ID "spanProfile", I tried to do this:
$("#spanProfile").val(@Twitter.Profile(searchTerm));
...but it doesn't recognize "searchTerm" (searchTerm is a jQuery var) declared in the same (button click) event where this line appears (now commented out).
Why does jQuery seem to recognize the Razor stuff but not its own var?