Click here to Skip to main content
15,892,809 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to update Gridview with value textbox = Null Pin
zaimah16-Oct-12 2:35
zaimah16-Oct-12 2:35 
GeneralRe: How to update Gridview with value textbox = Null Pin
Eddy Vluggen16-Oct-12 2:42
professionalEddy Vluggen16-Oct-12 2:42 
GeneralRe: How to update Gridview with value textbox = Null Pin
zaimah16-Oct-12 2:59
zaimah16-Oct-12 2:59 
GeneralRe: How to update Gridview with value textbox = Null Pin
Eddy Vluggen16-Oct-12 3:17
professionalEddy Vluggen16-Oct-12 3:17 
GeneralRe: How to update Gridview with value textbox = Null Pin
zaimah16-Oct-12 3:50
zaimah16-Oct-12 3:50 
GeneralRe: How to update Gridview with value textbox = Null Pin
Eddy Vluggen16-Oct-12 4:21
professionalEddy Vluggen16-Oct-12 4:21 
GeneralRe: How to update Gridview with value textbox = Null Pin
zaimah17-Oct-12 4:13
zaimah17-Oct-12 4:13 
GeneralRe: How to update Gridview with value textbox = Null Pin
Eddy Vluggen17-Oct-12 4:51
professionalEddy Vluggen17-Oct-12 4:51 
TryParse is indeed preferred over Convert.ToInt32. Didn't you find it weird that you had to add C1 as a parameter? It's not returning an integer (a number) but a boolean (y/no). Now, if we cast the boolean to an integer, it'll be -1. Could you try the value "42"? If it returns -42, a sign will be wrong, but I'm expecting it to return -1 also.

This should work;
VB
Dim C1 As Integer = 0
Integer.TryParse(C1S, C1)

..with the boolean indicating whether the conversion to an integer was successful or not (since the string can contain "Hello world", and might not be able to return a number). That could also be used like below;
VB
Dim C1 As Integer 
If Integer.TryParse(C1S, C1) Then
  'use C1
Else
  'couldn't be converted to a number, insert default
End If

Out of curiosity; when did you start with programming?
Bastard Programmer from Hell Suspicious | :suss:
if you can't read my code, try converting it here[^]

GeneralRe: How to update Gridview with value textbox = Null Pin
zaimah17-Oct-12 5:25
zaimah17-Oct-12 5:25 
GeneralRe: How to update Gridview with value textbox = Null Pin
zaimah17-Oct-12 6:04
zaimah17-Oct-12 6:04 
GeneralRe: How to update Gridview with value textbox = Null Pin
Eddy Vluggen17-Oct-12 9:20
professionalEddy Vluggen17-Oct-12 9:20 
AnswerRe: [SOLVED] How to update Gridview with value textbox = Null Pin
josephSurgeon31-Oct-12 4:27
josephSurgeon31-Oct-12 4:27 
QuestionIndex was outside the bounds of the array Pin
etteychan12-Oct-12 19:03
etteychan12-Oct-12 19:03 
AnswerRe: Index was outside the bounds of the array Pin
Richard MacCutchan12-Oct-12 21:07
mveRichard MacCutchan12-Oct-12 21:07 
QuestionConfused by my own code: LINQ FirstOrDefault Pin
Steven St. John11-Oct-12 13:18
Steven St. John11-Oct-12 13:18 
AnswerRe: Confused by my own code: LINQ FirstOrDefault Pin
Steven St. John16-Oct-12 6:58
Steven St. John16-Oct-12 6:58 
QuestionVB.NET Parameters error Pin
Diego Carrion11-Oct-12 4:12
Diego Carrion11-Oct-12 4:12 
AnswerRe: VB.NET Parameters error Pin
Simon_Whale11-Oct-12 4:45
Simon_Whale11-Oct-12 4:45 
GeneralRe: VB.NET Parameters error Pin
Diego Carrion11-Oct-12 4:47
Diego Carrion11-Oct-12 4:47 
GeneralRe: VB.NET Parameters error Pin
ChandraRam11-Oct-12 11:06
ChandraRam11-Oct-12 11:06 
QuestionSlow Ping and not guaranteed success Pin
Herboren10-Oct-12 5:44
Herboren10-Oct-12 5:44 
AnswerRe: Slow Ping and not guaranteed success Pin
Dave Kreskowiak10-Oct-12 8:13
mveDave Kreskowiak10-Oct-12 8:13 
GeneralRe: Slow Ping and not guaranteed success Pin
Herboren10-Oct-12 11:33
Herboren10-Oct-12 11:33 
GeneralRe: Slow Ping and not guaranteed success Pin
Dave Kreskowiak10-Oct-12 13:01
mveDave Kreskowiak10-Oct-12 13:01 
GeneralRe: Slow Ping and not guaranteed success Pin
Herboren10-Oct-12 16:20
Herboren10-Oct-12 16:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.