ورود

View Full Version : مشکل در لود WebUserControl



zahrashoja
چهارشنبه 16 اسفند 1391, 20:09 عصر
یه WebUserControl ساختم ولی وقتی میخوام لودش کنم
خطا میده : Object reference not set to an instance of an object



Control n = LoadControl("panel_notice.ascx");
Panel3.Controls.Add(n);


توی خط دوم خطا میده ..نمیدونم چکار کنم .. چنتا کنترل دیگه رو به همین صورت استفاده کردم و مشکلی نداشته
سپاس گذارم اگه میتونید کمکم کنید

crazy_1892
چهارشنبه 16 اسفند 1391, 20:36 عصر
حوب چه خطایی میده؟

zahrashoja
چهارشنبه 16 اسفند 1391, 21:31 عصر
گفتم که خطاشو
Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.