Click here to Skip to main content
16,005,038 members
Home / Discussions / C#
   

C#

 
AnswerRe: Exporting DataGrid contents to Excel Pin
debnathrubs13-Feb-07 23:34
debnathrubs13-Feb-07 23:34 
Questionget ipaddress Pin
Nekshan13-Feb-07 22:53
Nekshan13-Feb-07 22:53 
AnswerRe: get ipaddress Pin
virendra patel13-Feb-07 22:58
virendra patel13-Feb-07 22:58 
GeneralRe: get ipaddress Pin
Nekshan13-Feb-07 23:03
Nekshan13-Feb-07 23:03 
GeneralRe: get ipaddress Pin
virendra patel13-Feb-07 23:48
virendra patel13-Feb-07 23:48 
AnswerRe: get ipaddress Pin
Blue_Boy13-Feb-07 23:20
Blue_Boy13-Feb-07 23:20 
QuestionUser Controls [modified] Pin
mark_w_13-Feb-07 22:50
mark_w_13-Feb-07 22:50 
AnswerRe: User Controls Pin
Martin#13-Feb-07 23:22
Martin#13-Feb-07 23:22 
Hello,

The designer calls the Constructor and also the setters of properties if they are set, from your usercontrol.
In your case you whant to access an object wich is not created (instanziated) yet, therefore you get this null ref Exception.

You first have to find the point in the usercontrol where the exception is thrown:

You could start a second instance of your project and then connect at youre first instance.
After that you should set a breakpoint in your controls constructor, and then open the form (designer) in the first project.

Or go threw the code and look for unsafe code (like access without a != null if statement).

Once you find your problem please don't use the "DesignMode" property (like some programers would recommend) as a workaround, make it run by changing maybe the design or use an if statement.

Hope that helps!

All the best,

Martin

GeneralRe: User Controls Pin
mark_w_13-Feb-07 23:39
mark_w_13-Feb-07 23:39 
AnswerRe: User Controls Pin
Martin#14-Feb-07 0:06
Martin#14-Feb-07 0:06 
GeneralRe: User Controls Pin
mark_w_14-Feb-07 0:27
mark_w_14-Feb-07 0:27 
QuestionRun SQL Server script from C# code Pin
Sushant Duggal13-Feb-07 22:15
Sushant Duggal13-Feb-07 22:15 
AnswerRe: Run SQL Server script from C# code Pin
Blue_Boy13-Feb-07 22:33
Blue_Boy13-Feb-07 22:33 
AnswerRe: Run SQL Server script from C# code Pin
Pete O'Hanlon13-Feb-07 22:41
mvePete O'Hanlon13-Feb-07 22:41 
GeneralRe: Run SQL Server script from C# code Pin
Sushant Duggal14-Feb-07 0:28
Sushant Duggal14-Feb-07 0:28 
AnswerRe: Run SQL Server script from C# code Pin
Colin Angus Mackay13-Feb-07 23:59
Colin Angus Mackay13-Feb-07 23:59 
AnswerRe: Run SQL Server script from C# code Pin
Sushant Duggal14-Feb-07 0:30
Sushant Duggal14-Feb-07 0:30 
Questionrichtextbox question Pin
frossie13-Feb-07 22:03
frossie13-Feb-07 22:03 
Questionget value from string into textbox Pin
Nekshan13-Feb-07 21:50
Nekshan13-Feb-07 21:50 
AnswerRe: get value from string into textbox Pin
N a v a n e e t h13-Feb-07 21:52
N a v a n e e t h13-Feb-07 21:52 
GeneralRe: get value from string into textbox Pin
Nekshan13-Feb-07 21:57
Nekshan13-Feb-07 21:57 
AnswerRe: get value from string into textbox Pin
virendra patel13-Feb-07 21:54
virendra patel13-Feb-07 21:54 
GeneralRe: get value from string into textbox Pin
Nekshan13-Feb-07 22:02
Nekshan13-Feb-07 22:02 
GeneralRe: get value from string into textbox Pin
virendra patel13-Feb-07 22:04
virendra patel13-Feb-07 22:04 
Questionhow can i send/receive data to parallel port in C#.net and windows XP Pin
gpremkamal13-Feb-07 21:49
gpremkamal13-Feb-07 21:49 

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.