Click here to Skip to main content
15,892,674 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Runtime Creation Of Button+Adding Events+Sourabh Pin
pmarfleet3-Nov-07 11:29
pmarfleet3-Nov-07 11:29 
GeneralRe: Runtime Creation Of Button+Adding Events+Sourabh Pin
Dot Net Jantu3-Nov-07 19:45
Dot Net Jantu3-Nov-07 19:45 
GeneralRe: Runtime Creation Of Button+Adding Events+Sourabh Pin
pmarfleet3-Nov-07 23:05
pmarfleet3-Nov-07 23:05 
AnswerRe: Runtime Creation Of Button+Adding Events+Sourabh Pin
Christian Graus3-Nov-07 12:19
protectorChristian Graus3-Nov-07 12:19 
QuestionPassing argument to function Pin
csinva3-Nov-07 8:36
csinva3-Nov-07 8:36 
AnswerRe: Passing argument to function Pin
pmarfleet3-Nov-07 9:03
pmarfleet3-Nov-07 9:03 
GeneralRe: Passing argument to function Pin
csinva3-Nov-07 9:12
csinva3-Nov-07 9:12 
GeneralRe: Passing argument to function Pin
pmarfleet3-Nov-07 9:21
pmarfleet3-Nov-07 9:21 
csinva wrote:
Dim sUserID As Integer
sUserID = lblUserID.Text

sUserID = Convert.ToInt32(myCommand.ExecuteScalar())


This bit of code doesn't make any sense. Why do you assign a value to sUserID in one line and then reassign the value in the next line. Surely this is unnecessary?

I assume the code crashes on the first assignment. You can't implicitly cast a string value to an Integer. If the value of lblUserID.Text is an empty string obviously there is no numeric equivalent. You should use Integer.TryParse to perform type conversions if you don't know in advance that they will be successful.

Paul Marfleet

"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush


AnswerRe: Passing argument to function Pin
Guffa3-Nov-07 9:27
Guffa3-Nov-07 9:27 
AnswerRe: Passing argument to function Pin
Guffa3-Nov-07 9:12
Guffa3-Nov-07 9:12 
GeneralRe: Passing argument to function Pin
csinva3-Nov-07 9:56
csinva3-Nov-07 9:56 
GeneralRe: Passing argument to function Pin
csinva3-Nov-07 10:29
csinva3-Nov-07 10:29 
AnswerRe: Passing argument to function Pin
Guffa3-Nov-07 11:22
Guffa3-Nov-07 11:22 
Question[Message Deleted] Pin
Unknown Ajanabi3-Nov-07 2:42
Unknown Ajanabi3-Nov-07 2:42 
AnswerRe: i want to know how to create page dynamically like Sulekha.com Pin
Malcolm Smart3-Nov-07 4:23
Malcolm Smart3-Nov-07 4:23 
AnswerRe: i want to know how to create page dynamically like Sulekha.com Pin
Mircea Grelus3-Nov-07 5:15
Mircea Grelus3-Nov-07 5:15 
GeneralRe: i want to know how to create page dynamically like Sulekha.com Pin
Paul Conrad3-Nov-07 5:22
professionalPaul Conrad3-Nov-07 5:22 
Questionajax.net Pin
Rinki Mukheraji3-Nov-07 1:19
Rinki Mukheraji3-Nov-07 1:19 
AnswerRe: ajax.net Pin
InsDev3-Nov-07 1:33
InsDev3-Nov-07 1:33 
GeneralRe: ajax.net Pin
Rinki Mukheraji3-Nov-07 1:49
Rinki Mukheraji3-Nov-07 1:49 
AnswerRe: ajax.net Pin
Mircea Grelus3-Nov-07 2:10
Mircea Grelus3-Nov-07 2:10 
AnswerRe: ajax.net Pin
Unknown Ajanabi3-Nov-07 2:34
Unknown Ajanabi3-Nov-07 2:34 
AnswerRe: ajax.net Pin
Braulio Dez3-Nov-07 6:20
Braulio Dez3-Nov-07 6:20 
Questionform closing event Pin
Sonia Gupta3-Nov-07 1:00
Sonia Gupta3-Nov-07 1:00 
AnswerRe: form closing event Pin
InsDev3-Nov-07 1:30
InsDev3-Nov-07 1:30 

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.