The breakpoint will not currently be hit. The specified module has not been loaded

The breakpoint will not currently be hit. The specified module has not been loaded

When you debug with Visual Studio 2005 and a Windows Mobile/Windows CE/Pocket PC from 5.0 to 6.5 version device running .NET Compact Framework 2.0 breakpoint not works showing a ring instead of the normal red dot and when holding the mouse over it shows the above error message.

Solution:
Close Visual Studio and re-install the SDK.

Note: If still not work download and install the following patch
.NET Compact Framework 2.0 Service Pack 1 Patch

Did my solution solve your problem? Leave a reply.

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:

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

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:

<%@ Page Language="c#" MasterPageFile="~/MasterPage.master" ClientTarget="uplevel" %>

Did my solution solve your problem? Leave a reply.

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

When you try to validate your page with W3C Markup Validation Service at the line when you have a TextBox with AutoComplete attribute like this:

<asp:TextBox ID="myTextBox" runat="server" AutoComplete="Off" />

show the following error message:

there is no attribute “AutoComplete”

Solution:
Change
AutoComplete=”Off”
to
AutoCompleteType=”None”

<asp:TextBox ID="myTextBox" runat="server" AutoCompleteType="None" />

Did my solution solve your problem? Leave a reply.

HOW TO test Socket connections

To test Socket connections I suggest you the following freeware tool:


Hercules SETUP utility to test Socket connections
Hercules SETUP utility

Functions: TCP/IP Client Server terminal, UDP/IP terminal and Serial Port terminal.

Did my HOW TO help you? Leave a reply.

HOW TO extract decimal part or integer part from a Decimal number in C# or VB.NET

Exaples to extract decimal part or integer part from a Decimal number in C# or VB.NET

VB.NET

Dim myDecimal As Decimal = 3.7             'myDecimal = 3.7
Dim integer_part As Integer

integer_part = Decimal.Truncate(myDecimal) 'integer_part = 3

integer_part = Decimal.ToInt16(myDecimal)  'integer_part = 3
integer_part = Decimal.ToInt32(myDecimal)  'integer_part = 3
integer_part = Decimal.ToInt64(myDecimal)  'integer_part = 3
integer_part = Decimal.Floor(myDecimal)    'integer_part = 3

'Following lines cause a Round (WRONG RESULT)
Dim rounded_integer_part As Integer
rounded_integer_part = myDecimal                  'rounded_integer_part = 4, result different from C#
rounded_integer_part = Decimal.Ceiling(myDecimal) 'rounded_integer_part = 4

'Obviously decimal_part is calculated as difference
Dim decimal_part As Decimal 
decimal_part = myDecimal - Decimal.Truncate(integer_part)  'decimal_part = 0.7

C#

Decimal myDecimal  = 3.7M;                       //myDecimal = 3.7
int integer_part;

integer_part = (int)Decimal.Truncate(myDecimal); //integer_part = 3

integer_part = (int)Decimal.ToInt16(myDecimal);  //integer_part = 3
integer_part = (int)Decimal.ToInt32(myDecimal);  //integer_part = 3
integer_part = (int)Decimal.ToInt64(myDecimal);  //integer_part = 3
integer_part = (int)Decimal.Floor(myDecimal);    //integer_part = 3
integer_part = (int)myDecimal;                   //integer_part = 3, result different from VB

//Following line cause a Round (WRONG RESULT)
int rounded_integer_part = (int)Decimal.Ceiling(myDecimal); //rounded_integer_part = 4

//Obviously decimal_part is calculated as difference
Decimal decimal_part;
decimal_part = myDecimal - Decimal.Truncate(integer_part);  //decimal_part = 0.7

Did my HOW TO help you? Leave a reply.

HOW TO make VB to C# or C# to VB conversion code

With this HOW TO I would like to put together tips to make the code conversion VB to C# or C# to VB.

VB C#
Asc Convert.ToInt32();
Chr Convert.ToChar();
Len String.Length();
Mid String.Substring();
ChrW(65) System.Convert.ToChar(65).ToString();
AscW('A')
System.Convert.ToInt32('A').ToString();

This post will be updated continuously by inserting each time new information.

Any suggestion is welcome.

Did my HOW TO help you? Leave a reply.

C#.NET – “The name ‘New’ does not exist in the current context”

The name ‘New’ does not exist in the current context

In Italian

Il nome ‘New’ non esiste nel contesto corrente

Cause:

Probably you copied VB code

Solution:

In C# new is written with lower case n.

Did my solution solve your problem? Leave a reply.