בעיה חמורה (VS7)

Admini

New member
איך עושים את זה ?

מצטער אם שלחתי שוב..... משהו פה דפוק
 

gilad g

New member
../images/Emo26.gif

ב-codebehind של ה-user controls (סיומת ascx.cs בדרך כלל), אמור להיות מוגדר ה-type שלו:
public class myUserControl : WebUserControl { .... }​
אתה לוקח את השם של ה-type הזה, ומגדיר לפיו אובייקט ב-code behind של הדף שלך:
public class myPage : Page { //Add this line: protected myUserControl myCtrl; //from now on we will refer to our user control as myCtrl. }​
שים לב שחובה שהוא יהיה protected.
 

Admini

New member
Session Object

הקוד הזה עבד יפה, אבל לא בתוך רכיב ASCX:
sStr = Session("admini_mail_session")​
השגיאה:
Object reference not set to an instance of an object.​
 

gilad g

New member
ה-Session ריק,

ולכן הוא מחזיר null. בדוק אם יש סיבה מדוע דווקא ברכיב ה-Session ריק
 
למעלה