netpicker9
Member
- Joined
- Dec 8, 2004
- Messages
- 17
- Programming Experience
- 1-3
Hi,
I am getting a Array of Values from vb.net dll. The Array containes all types of values..
I am displaying data on aspx page from that array. Problem is,
Arr(0,5) is returning 0.0 {Double}
Arr(1,5) is returning "" {String}
While displaying data in aspx page.. I wrote.
Dim totAll as Double
totAll = String.Format("{0:c}", Arr(i,5))
I am getting Error at this line as Conversion from string to type 'Double' is not valid. only for Arr(1,5). Arr(0,5) is fine
How to avoid this error?
Other options I tried
totAll = String.Format("{0:c}", Convert.ToDouble(Arr(i,5))) --> Error --> Input string was not in a correct format. Because Arr(1,5) is giving "".
I am using VB.net with Visual Studio 2005. I prefer VB.net code.
Thanks
I am getting a Array of Values from vb.net dll. The Array containes all types of values..
I am displaying data on aspx page from that array. Problem is,
Arr(0,5) is returning 0.0 {Double}
Arr(1,5) is returning "" {String}
While displaying data in aspx page.. I wrote.
Dim totAll as Double
totAll = String.Format("{0:c}", Arr(i,5))
I am getting Error at this line as Conversion from string to type 'Double' is not valid. only for Arr(1,5). Arr(0,5) is fine
How to avoid this error?
Other options I tried
totAll = String.Format("{0:c}", Convert.ToDouble(Arr(i,5))) --> Error --> Input string was not in a correct format. Because Arr(1,5) is giving "".
I am using VB.net with Visual Studio 2005. I prefer VB.net code.
Thanks