PROKA Posted April 11, 2005 Posted April 11, 2005 (edited) I thought I am skilled enough to resolve any null_exception, but damn me, i don't know how to repair this one. Check the attachment Edited March 13, 2007 by PROKA Quote Development & Research Department @ Elven Soft
Tamer_Ahmed Posted April 11, 2005 Posted April 11, 2005 actually i don't know what is ur problem Quote
PROKA Posted April 12, 2005 Author Posted April 12, 2005 Well, when I click the button, I get a '/Null Exception Bug'. The app is more complex, it takes data from an sql server and it writes data to the sql server, but I took that part away . That's my only problem, the button throwing a null exception . I have created an user control, and put some of it on the form. To work easier with them, I created an array, Which I initialize in the load page event. When loading data from the sql server it works perfectly ( also in the page-load event ), but when clicking the button, the array = Nothing Quote Development & Research Department @ Elven Soft
Administrators PlausiblyDamp Posted April 12, 2005 Administrators Posted April 12, 2005 You are only creating the controls when the page first loads, subsequent page loads do not recreate them hence the null reference. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
PROKA Posted April 12, 2005 Author Posted April 12, 2005 (edited) Yes but if I re-initialize them, I lose the properties . For example, If I type something in the textbox, it won't matter it will take the text from the 'original' control ( "" ) :( ---------------------------------------------------- Later Edit : Ok, I solved the problem, using a collection and some little tricks, and the page works corectly now, but I'm still interested in one issue : How can I prevent a postback when clicking a button ? ( sorry if the Q is too dummy, I'm quite new to aspn ) Edited April 12, 2005 by PROKA Quote Development & Research Department @ Elven Soft
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.