Categories
7.5 C#.NET Microsoft VB.NET Visual Studio Windows Phone

‘DataContractAttribute’ does not exist in the namespace ‘System.Runtime.Serialization’

The type or namespace name ‘DataContractAttribute’ does not exist in the namespace ‘System.Runtime.Serialization’ (are you missing an assembly reference?)

in Italian:

Il tipo o il nome dello spazio dei nomi ‘DataContractAttribute’ non esiste nello spazio dei nomi ‘System.Runtime.Serialization’; probabilmente manca un riferimento a un assembly

Solution:

Add the following References to your project:

System.Runtime.Serialization
System.ServiceModel.Web

In Solution Explorer, right-click on the project node and click Add Reference to select the dll files.
Remember to add using or Imports lines inside your file.

Did my solution solve your problem? Leave a reply.

Categories
C#.NET Google Microsoft VB.NET Visual Studio W3C Windows 7 Windows 8 / 8.1 Windows Server 2008 Windows Server 2012 Windows Vista Windows XP

W3C validator – “there is no attribute “border””

When you try to validate your page with W3C Markup Validation Service at the line when you have an ImageButton like this:

[sourcecode language=”html”]<asp:ImageButton runat="server" ToolTip="Click here to load new image" ID="ImageButtonRefresh" ImageUrl="images/refresh.png" OnClick="ImageButtonRefresh_Click" CausesValidation="false" />[/sourcecode]

show the following error message:

there is no attribute “border”

Cause:
<asp:ImageButton> renders a border=”0″ output.

Solution:
Add ClientTarget=”uplevel” in your page’s Page directive, for example:

[sourcecode language=”html”]<%@ Page Language="c#" MasterPageFile="~/MasterPage.master" ClientTarget="uplevel" %>[/sourcecode]

Did my solution solve your problem? Leave a reply.