Friday, October 22, 2010

How To Solve System.Web.Mvc.HtmlHelper' does not contain a definition for 'RenderPartial' and no extension method 'RenderPartial'

Sometimes there are errors when you build in ASP.NET MVC that just make you want to shoot your own computer! You resist the urge of course (I hope), but the desire is still there! While I was creating an extension helper in ASP.NET MVC using Visual Studio 2010, I came across this error:

How To Solve System.Web.Mvc.HtmlHelper' does not contain a definition for 'RenderPartial' and no extension method 'RenderPartial' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be found (are you missing a using directive or an assembly reference?)

Ummm.....NO I am NOT missing a using directive or assembly reference - thank you very much! Well actually I was - LOL. I'm using MVC2. It seems that it wants an additional reference to reference RenderPartial now.

Here is a list of the usings I was using
(notice that wording - "usings I was using" - that makes me laugh - I crack myself up sometimes!) -

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Web.Routing;
using System.Web;
using System.Reflection;

The using statements above SHOULD be enough to allow me to use RenderPartial. Unfortunately, I had to add ONE MORE using statement to make it work -

using System.Web.Mvc.Html;

That solved the issue! Why does Microsoft change little things like this? Do they do it just to drive people crazy?

Smooches,

Kila


PROBLEM:
How To Solve System.Web.Mvc.HtmlHelper' does not contain a definition for 'RenderPartial' and no extension method 'RenderPartial' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be found (are you missing a using directive or an assembly reference?)

SOLUTION:
Make sure you are referencing MVC in your web.config, make sure you have a mvc using statements listed above in your file and make sure you add the following item to that list of using statements.

using System.Web.Mvc.Html;

Sunday, October 10, 2010

Problems With The HP ZD8000!

There are very few products that I actually can say that I hate, however, HP has managed to make two products that are on my list.

A few years ago, I was given an HP zd8000 as a gift. I know the person that gave this thing to me cares for me very much so I don't hate them, but this laptop has to be one of the worst pieces of technology I have EVER owned. If this was my only laptop, I would be really, really angry right now. As it stands, it is one of many. However, since I just had to spend more time than I care to admit upgrading it to Windows7, I'm going to just list the problems I have had to date.

The computer is now 3 years old. However, I have been having many of these issues for a while now.

1.) The keyboard misses, skips and does not register some keystrokes. It happens to all of the keys. You will go along typing with a smile on your face only to realize that half the letters you typed were not registered by the keyboard. I used to have a USB keyboard attached to this laptop so I didn't notice this problem. It makes you want to scream!

2.) Several of the USB ports have DISCONNECTED from whatever they are connected to inside of the computer. I'm pretty handy with a screwdriver so I can correct this one, but it should not have happened in the first place.

3.) The computer overheats to the point that it could cause a fire! I have handled this issue with a Belkin cooling fan underneath the laptop. I hope this will help.

4.) The DVD RW drive stopped recognizing DVDs. This was OK after an upgrade to Windows 7. Well let me say that it MIGHT be OK. I say MIGHT because I JUST upgraded the machine from XP to Windows 7 TODAY! However, so far so good on that issue.

5.) The laptop battery no longer works. The system will not register that there is a battery. This is my FOURTH battery! There is a recall on this issue, so maybe it will work now.

6.) The power supply stopped working. It seems like it is the power supply connector that is the issue. I had to use some electrical tape to keep it connected and still.

7.) The middle of the touch pad has worn down to the point that I can see the green circuit board underneath it.

Of course, the warranty is gone so the best I can do is replace the parts myself. I wasn't angry about these things until I did a search and discovered that these are major issues for MANY ZD8000 owners! In fact, I saw MANY people talking about and suggesting class action lawsuits over the ZD8000 issues.

It makes me feel sick to my stomach that a company like HP would make computers like this without the thorough testing needed to make sure that they will work consistently and it really makes me sick to know that HP won't make things right!