TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
dishastanu
NA
2
0
Object reference not set to an instance of an object.
Sep 19 2003 3:05 PM
Hi, In ASP.Net, (code behind C#) from a aspx page i am calling a function of different class(aspx page). In that function i have set a TextBox Text property -> tb.Text="Something" (TextBox is already there..no issues). public void UpdateChatBox() { //tb= new System.Web.UI.WebControls.TextBox(); tb.Text="Something"; } If I call this function from the same page it works fine, as i have mentioned its refernce in the class. protected System.Web.UI.WebControls.TextBox tb; But when I call the same function from another asx page (class); the line tb.Text="Something"; gives the famous error-> Object reference not set to an instance of an object. Adding tb= new System.Web.UI.WebControls.TextBox(); doesn't olve the problem. Can somebody please help. Thanx in advance.
Reply
Answers (
2
)
Client-side web application a la Java Applets
2 ASP.NET Questions