0 Replies - 3327 Views - Last Post: 01 November 2011 - 10:41 PM Rate Topic: -----

#1 priscy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 30-October 11

Error while Setting Web label Control form a Thread

Posted 01 November 2011 - 10:41 PM

this code shows me an error while setting the label value the error shown is: object reference not set to an instance of an object

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
_Default obj = new _Default();
Thread thread = new Thread(new ThreadStart(obj.ThreadStart));
thread.Start();


}

public void ThreadStart()
{

reading();

}
private void reading()
{
label.text = "hi";
}
}

Is This A Good Question/Topic? 0
  • +

Page 1 of 1