Click here to Skip to main content
15,912,756 members
Home / Discussions / C#
   

C#

 
AnswerRe: datagrid reorder Pin
Luc Pattyn21-May-09 10:30
sitebuilderLuc Pattyn21-May-09 10:30 
AnswerRe: datagrid reorder Pin
michaelgr121-May-09 19:40
michaelgr121-May-09 19:40 
GeneralRe: datagrid reorder Pin
Luc Pattyn22-May-09 2:05
sitebuilderLuc Pattyn22-May-09 2:05 
QuestionHttpWebRequest and something to do with security level... Pin
SimpleData21-May-09 9:21
SimpleData21-May-09 9:21 
AnswerRe: HttpWebRequest and something to do with security level... Pin
Manas Bhardwaj21-May-09 11:12
professionalManas Bhardwaj21-May-09 11:12 
GeneralRe: HttpWebRequest and something to do with security level... Pin
SimpleData22-May-09 3:20
SimpleData22-May-09 3:20 
Questionhow to ceate event_click for button with C# ? [modified] Pin
xingselex21-May-09 9:18
xingselex21-May-09 9:18 
AnswerRe: how to ceate event_click for button with C# ? Pin
Luc Pattyn21-May-09 10:15
sitebuilderLuc Pattyn21-May-09 10:15 
Hi,

if that handler gets connected to an event of something other than a Button, then
Button clickedButton = sender as Button ; will set clickedButton to null.

You can take care of that by changing your code to:
...
if (clickedButton!=null && clickedButton.Name == "Program")
...


or by making absolutely sure only Buttons are being wired up to this handler.

FWIW: the fact that the handler's name starts with "Button" is fine for readability but does not change the way the code works.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.

AnswerRe: how to ceate event_click for button with C# ? Pin
_Maxxx_21-May-09 17:35
professional_Maxxx_21-May-09 17:35 
Questionhow create a Function return as DataTable with C# ? Pin
xingselex21-May-09 8:22
xingselex21-May-09 8:22 
AnswerRe: how create a Function return as DataTable with C# ? Pin
0x3c021-May-09 8:26
0x3c021-May-09 8:26 
AnswerRe: how create a Function return as DataTable with C# ? Pin
MidwestLimey21-May-09 8:50
professionalMidwestLimey21-May-09 8:50 
AnswerRe: how create a Function return as DataTable with C# ? Pin
cod3newbie22-May-09 7:19
cod3newbie22-May-09 7:19 
QuestionAutomatic webbrowsing gives "object reference not set to an instance of an object" Pin
Member 441789221-May-09 8:17
Member 441789221-May-09 8:17 
AnswerRe: Automatic webbrowsing gives "object reference not set to an instance of an object" Pin
0x3c021-May-09 8:21
0x3c021-May-09 8:21 
AnswerRe: Automatic webbrowsing gives "object reference not set to an instance of an object" Pin
Luc Pattyn21-May-09 8:22
sitebuilderLuc Pattyn21-May-09 8:22 
AnswerRe: Automatic webbrowsing gives "object reference not set to an instance of an object" Pin
Member 441789221-May-09 8:26
Member 441789221-May-09 8:26 
GeneralRe: Automatic webbrowsing gives "object reference not set to an instance of an object" Pin
0x3c021-May-09 8:27
0x3c021-May-09 8:27 
GeneralRe: Automatic webbrowsing gives "object reference not set to an instance of an object" Pin
Member 441789221-May-09 8:31
Member 441789221-May-09 8:31 
GeneralRe: Automatic webbrowsing gives "object reference not set to an instance of an object" Pin
0x3c021-May-09 9:03
0x3c021-May-09 9:03 
QuestionProblem | Delegates, Events, Win App in c# Pin
dinbrca3521-May-09 7:33
dinbrca3521-May-09 7:33 
AnswerRe: Problem | Delegates, Events, Win App in c# Pin
Luc Pattyn21-May-09 8:18
sitebuilderLuc Pattyn21-May-09 8:18 
QuestionUnmanaged DLL persistance in C# [solved] Pin
Trollslayer21-May-09 7:32
mentorTrollslayer21-May-09 7:32 
AnswerRe: Unmanaged DLL persistance in C# PinPopular
Dave Kreskowiak21-May-09 8:00
mveDave Kreskowiak21-May-09 8:00 
GeneralRe: Unmanaged DLL persistance in C# Pin
Trollslayer21-May-09 8:18
mentorTrollslayer21-May-09 8:18 

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.