Hi, 
Thanks Guys , 
Thanks to Mark, Charlescaroll, and you,
Yesterday i have solved the problem.
 
thanks a lot

Ying Jin <[EMAIL PROTECTED]> wrote:
Try this to see what happens:
1) Remove these two lines from Page_Load()
TopMenus objTopmenu=new TopMenus();
objTopmenu.Table_Menu.Rows[1].Cells[1].BorderWidth=2;
2) Instead, rearrange the control load steps as
follows:
Control Ctl1= LoadControl("Include/TopMenus.ascx");
TopMenus objTopmenu = (TopMenus)c1
objTopmenu.Table_Menu.Rows[1].Cells[1].BorderWidth=2;
Page.Controls.Add(Ctl1);

Let us know how it goes.
--- Arindam wrote:

> 
> Hi Champs, 
> Pls look at the following problem .
> 
> Error I am getting 
> System.NullReferenceException: Object reference not
> set to an instance 
> of an object
> 
> pointing at
>
objTopmenu.Table_Menu.Rows[1].Cells[1].BorderWidth=2;
> 
> 
> 
> 
> 
> TopMenus objTopmenu=new TopMenus(); // here inatance
> is created 
> sucessfully
> 
> //the below line giving error, where trying to set
> the Cells border 
> width of 
> of user control
>
objTopmenu.Table_Menu.Rows[1].Cells[1].BorderWidth=2;
> 
> 
> // this step also i ahve done in Page_Load, of the
> page i am calling 
> usercontrol from
> Control Ctl1= LoadControl("Include/TopMenus.ascx");
> Page.Controls.Add(Ctl1); 
> 
> 
> 
> Thanks & Regards
> 
> Arindam 
> Web Designer & Developer 
> 
> 
> 
> 
> 
> 
> 
> Thanks & Regards
> 
> Arindam 
> Web Designer & Developer 
> 
> 
> 
> 
> 
> ---------------------------------
> How much free photo storage do you get? Store your
> friends n family photos for FREE with Yahoo! Photos.
> 
> http://in.photos.yahoo.com
> 
> [Non-text portions of this message have been
> removed]
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



Yahoo! Groups Links









Thanks & Regards

Arindam 
Web Designer & Developer  




                
---------------------------------
How much free photo storage do you get? Store your friends n family photos for 
FREE with Yahoo! Photos. 
 http://in.photos.yahoo.com

[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to