Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 23rd, 2007, 5:17 PM   #1
paulchwd
Hobbyist Programmer
 
paulchwd's Avatar
 
Join Date: Mar 2005
Posts: 139
Rep Power: 4 paulchwd is on a distinguished road
Null Reference Expeption... why?

Hi All,

I have a label on my aspx page and when I try to set the .Text property of if from the code behind file I get a null reference expeption....

Code behind file for form1
 catch (MySqlException mysqlx)
            {//<catch>
                showError show = new showError();
                show.printError(mysqlx.Message.ToString(), mysqlx.StackTrace.ToString());
            }//</catch>

Code behind file for form2
public partial class showError : System.Web.UI.Page
    {
        public void printError(string error, string trace)
        {
            Label2.Text = "xx";
        }
}
paulchwd is offline   Reply With Quote
Old Sep 23rd, 2007, 11:16 PM   #2
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 381
Rep Power: 4 xavier is on a distinguished road
Send a message via Yahoo to xavier
How does your aspx look like ?
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
avl trees final step bl00dninja C++ 7 May 11th, 2007 12:05 AM
AVL delete function bl00dninja C++ 1 May 4th, 2007 9:04 AM
avl trees again bl00dninja C++ 0 May 3rd, 2007 3:07 AM
My first WIN32 API application ivan Show Off Your Open Source Projects 27 Jan 6th, 2006 5:04 PM
airport Log program using 3D linked List : problem reading from file gemini_shooter C++ 0 Mar 2nd, 2005 4:12 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:36 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC