This is a migrated thread and some comments may be shown as answers.

[Solved] Object ref not set ..but in newly hosted site only

2 Answers 91 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Neal
Top achievements
Rank 1
Neal asked on 24 Sep 2009, 09:31 AM
Hi All,

I have just uploaded my site to DiscountAsp.Net, and get an error in my javascript, when trying to recognise a Server variable
(Works fine on my Dev Machine)

i.e.   Object reference not set to an instance of an object. and the stack trace lists  Telerik.WebControls.RadWindowManager.BuildTemplates()  as the last 2 in the stack.
Am Using Vers 2009.1 and ASP:scriptmanager
 

<

 

body topmargin=10 leftmargin=0 onload="CheckCloseRefresh()" scroll="no">

 

 

<form id="form1" runat="server" >

 

 

<asp:scriptmanager ID="Scriptmanager2" runat="server"></asp:scriptmanager>

 

 

<script language="javascript" type="text/javascript">

 



Source Error:

Line 48:            function CheckCloseRefresh()
Line 49:            {                 
Line 50: if (<%= Show %> == true)Line 51:                 {
Line 52:                    Login();

Source File: e:\web\equistarco1\htdocs\Main.aspx    Line: 50

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.WebControls.RadWindowManager.BuildTemplates() +952
   Telerik.WebControls.RadWindowManager.Render(HtmlTextWriter writer) +243
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27

Any ideas or help please
Thanks
Neal

2 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 25 Sep 2009, 10:22 AM
Hello Neal,

At this point we cannot tell what the reason for the problem might be. Could you please open a support ticket and send us a sample project where this issue could be reproduced? Also please check if such server variable exists or if it is set as private - this could also be a reason for such problem.


Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Neal
Top achievements
Rank 1
answered on 25 Sep 2009, 01:40 PM
Hi .

The problem it seems was two fold.

1) I was using a mix of 2006.4 controls and 2009.1 assembly reference.
2) some java script code to determine the menu item (it's databound), clicked on by the user.
i.e.

 

<script language ="javascript" type ="text/javascript">

 

 

 

function Menu_OnClientItemClicked(sender, eventArgs)

 

{

 

var splitter = window["<%= RadSplitter2.ClientID %>"];

 

 

var pane = splitter.GetPaneById("ContentPane");

 

pane.SetContentUrl(url);

 

var url = eventArgs.Item.NavigateUrl;

 

}

 

 

</script>

 


I've cleaned it all up , only using the Telerik.Web.UI reference of 2009.1, and the problem is gone.

I have however a new problem which has to do with the "Outlook" styled collapsible PanelBar and Panel Items and the menus within it, in terms of their size and background settings disappearing.
And of course using 2009.1 , i now need to know how to intercept the menu item clicked on (client side..java scipt), to load other aspx pages into this the Main Form's content Pane area.

I'll post this in the appropriate place.
Thx
Neal
Tags
General Discussions
Asked by
Neal
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Neal
Top achievements
Rank 1
Share this question
or