Finally figured it out... The twitter widget code works fine in HTML but not on the Razor page. The code has an @ symbol in it to identify the Twitter id, but Razor uses @ symbols too. Had to escape the @ symbol by using another @ symbol for it to work. ie @@TwitterName
Simple fix, but bloody hard to find/search for if you don't know what you are looking for. It does help if you look at the mouseover error in Visual Studio. Hindsight works great too. Another plus, I'll be on the look out for @ symbols from now on. cheers, Stephen On Wed, Jan 30, 2013 at 11:45 AM, Ian Thomas <[email protected]> wrote: > Roughly 90% of the "name does not exist" errors are typos and/or > misspellings, and another 9% are just a variable that the author forgot to > declare; all other cases share the remaining 1%.**** > > Check whether it’s in the 99% ? **** > ------------------------------ > > **Ian Thomas** > Victoria Park, ****Western Australia******** > > ** ** > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Stephen Price > *Sent:* Wednesday, January 30, 2013 11:34 AM > *To:* ozDotNet > *Subject:* Embedded Twitter**** > > ** ** > > Hey all,**** > > ** ** > > Thought I'd stick a twitter feed on my website (MVC site) and when I paste > in their generated code for the widget, I get the following error. **** > > ** ** > > > *Compiler Error Message: *CS0103: The name 'FocusWestRealty' does not > exist in the current context**** > > ** ** > > A search for this error comes up with all kinds of generic issues but > nothing I can find that relates to either Twitter or MVC (or Javascript). > Likely something simple but not sure where to go from here. **** > > ** ** > > Any ideas how I might troubleshoot this further? **** > > ** ** > > cheers,**** > > Stephen**** > > p.s. posting this here so I will find the answer myself in five minutes, > but you have to treat it like a real issue or it won't work. :)**** >
