views:

26

answers:

1

I have a master page which is shared between about 20 views. In just one view, I need to make one small adjustment to the master page (I need to hide a textbox).

How can I include css or javascript in my view to acheive this?

Or is there some clever trick like including a conditional <% if (View.Name = "blah") { ... } %> that I can stick in my master page?

Thanks for any hints.

+2  A: 

As you said you can write a JavaScript code to achieve your goal and include it only in one view. In one of my projects I do the same: I have jQuery AJAX request only at one view, so I just used script tags to include it

Ventus
but don't script tags need to go in the `<head>`? Do you just put them directly in the view?
fearofawhackplanet
cool it works :) thanks
fearofawhackplanet