aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

Cannot Convert String to Type 'Double' is Not Valid in VB.NET

Apr 17, 2015

Here I will explain how to solve the problem of “cannot convert string to type 'Double' is not valid” in To solve this problem we need to use ‘& or CStr formats in string while assigning integer values to string in


In previous posts I explained save files in folder and download in, read or write text file in, upload and download files from database in, download multiple files as zip folder in and many articles relating to solve errors in, SQL Server, IIS, etc. Now I will explain how to solve the problem of “cannot convert string to type 'Double' is not validin

In one application when I tried to concatenate string value with integer values in  that time I got error like as shown below

Actually in we need to use ‘&’ or ‘CStr’ operators instead of ‘+’ operator for concatenation. We can follow different type methods to fix this problem in

Method 1:

lblMsg.Text = "Your Password Wrong you have only " & (3 - attempts) & " attempts"

Method 2:

lblMsg.Text = "Your Password Wrong you have only " + CStr(3 - attempts) + " attempts"

Method 3:

lblMsg.Text = String.Format("Your Password Wrong you have only {0} attempts", (3 - attempts))

I hope it helps you to solve your problem. Happy Coding……

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


website said...

yes, I also often face this problem, but the way you described it, so far brilliant. Keep it Up, we all learning and enhancing on page skills from you.

Give your Valuable Comments

Other Related Posts

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.