About

I'm Mike Pope. I live in the Seattle area. I've been a technical writer and editor for over 35 years. I'm interested in software, language, music, movies, books, motorcycles, travel, and ... well, lots of stuff.

Read more ...

Blog Search


(Supports AND)

Feed

Subscribe to the RSS feed for this blog.

See this post for info on full versus truncated feeds.

Quote

You don't have to wait to be an adult. There's no switch inside you that magically flips when you turn a certain age or graduate from some institution. You start being an adult when you decide to take responsibility for your life. You can do that at any age. [...] The only real difference between adults and high school kids is that adults realize they need to get things done, and high school kids don't.

Paul Graham



Navigation





<October 2024>
SMTWTFS
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

Categories

  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  

Contact Me

Email me

Blog Statistics

Dates
First entry - 6/27/2003
Most recent entry - 9/4/2024

Totals
Posts - 2655
Comments - 2677
Hits - 2,700,815

Averages
Entries/day - 0.34
Comments/entry - 1.01
Hits/day - 348

Updated every 30 minutes. Last: 2:15 PM Pacific


  12:21 PM

Here's the first of a couple of tips that are gleaned from the WebMatrix/ASP.NET Razor Beta 2 readme file. But who reads the readme? :-)

Tip: Helpers don't work in Beta 2 until you install them. Helpers like Twitter and Video and so on were broken out into a separate library (package) that you have to explicitly install before you can use them.[1] To do that you use the new package manager in Beta 2.

Say you try to run this code, which seems to be everyone's example of basic helpers:

@Twitter.Search("#WebMatrix", caption: "#WebMatrix", width: 740, height: 150)

Wham! You see something like this:


IOW, you see a "The name xxxx does not exist in the current context" error, where xxxx is the helper you're after.

Here's the process. Create a simple cshtml page (blank is ok). Inside WebMatrix, run it by clicking Run. This starts IIS Express and runs the page under localhost:8080, like this:


In the URL, remove the name of the file and substitute _Admin:


This invokes the package manager, which asks you to create a password:


Do that, and you'll get to the actual manager. There, click the Install button for microsoft-web-helpers 1.0:


When the install finishes, the helpers are installed and you're good to go.

Note that the assembly is installed in the bin folder of the current site, so it's not a global installation. You'll need to do this again in other sites. The package installs aother stuff too, primarily in the App_Data folder, plus a config file:


Hope this helps. More tips coming.

[1] I'm not actually 100% clear on why we did this. If I find out, I'll post about it.

Update Ok, got it. The idea is that by putting the helpers into a separate package, then can rev them outside the normal product release cycle much more easily. Makes sense, I guess.

[categories]   ,

[2] |