I'm migrating from Q2 2007 version to Q3 2008.
I have the following code:
and now I have translated it to the following one.
When I execute this appears a Visual Studio 2008 pop-up window with the message (I translate from Spanish) Microsoft JScript error at execution time: 'null' is null or not is an object, and the generated code I can see is:
What is happening here? Any solution for this?
I have the following code:
<asp:Panel ID="toolBarPanel" runat="server"> |
<radTlb:RadToolbar ID="toolBar" runat="server" UseFadeEffect="True" Skin="Mac" ButtonHeight="24px" |
ButtonWidth="24px" AutoPostBack="true" CatalogIconImageUrl="" SkinsPath="~/RadControls/Toolbar/Skins" |
ImagesDir="~/Imagenes/" OnOnClick="toolBar_OnClick" OnPreRender="toolBar_PreRender" |
ValidationGroup="GV1" > |
<Items> |
<radTlb:RadToolbarButton ID="button1" ButtonImage="image1.png" CommandName="CMD1" |
runat="server" ButtonText="CMD1" Hidden="False" CausesValidation="false" /> |
<radTlb:RadToolbarButton ID="button2" ButtonImage="image2.png" CommandName="CMD2" |
runat="server" ButtonText="CMD2" Hidden="False" CausesValidation="false" /> |
</Items> |
</radTlb:RadToolbar> |
<script type="text/javascript"> |
<!-- |
<%= toolBar.ClientID %>.attachEvent("OnClientClick","click_handler"); |
function click_handler(sender, e) |
{ |
if (sender.CommandName=='DELETE') { |
return confirm('<%= MissatgeDinamic("Del1") %>'); |
} |
} |
--> |
</script> |
</asp:Panel> |
and now I have translated it to the following one.
<asp:Panel ID="toolBarPanel" runat="server"> |
<telerik:RadToolBar ID="toolBar" runat="server" UseFadeEffect="True" Skin="Gray" ButtonHeight="24px" |
ButtonWidth="24px" AutoPostBack="true" OnButtonClick="toolBar_OnButtonClick" OnPreRender="toolBar_PreRender" |
ValidationGroup="GV1" > |
<Items> |
<telerik:RadToolbarButton ID="button1" ImageUrl="~/Imagenes/image1.png" CommandName="CM1" |
runat="server" ButtonText="CMD1" Hidden="False" CausesValidation="false" /> |
<telerik:RadToolbarButton ID="button2" ImageUrl="~/Imagenes/image2.png" CommandName="CM2" |
runat="server" ButtonText="CMD2" Hidden="False" CausesValidation="false" /> |
</Items> |
</telerik:RadToolBar> |
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
<script type="text/javascript"> |
$find("<%= toolBar.ClientID %>").attachEvent("OnClientClick","click_handler"); |
function click_handler(sender, e) |
{ |
if (sender.CommandName=='DELETE') { |
return confirm('<%= MissatgeDinamic("Del1") %>'); |
} |
} |
</script> |
</telerik:RadCodeBlock> |
</asp:Panel> |
When I execute this appears a Visual Studio 2008 pop-up window with the message (I translate from Spanish) Microsoft JScript error at execution time: 'null' is null or not is an object, and the generated code I can see is:
<div id="toolBar" class="RadToolBar RadToolBar_Horizontal RadToolBar_Gray RadToolBar_Gray_Horizontal " UseFadeEffect="True" ButtonHeight="24px" ButtonWidth="24px" style="z-index:9000;"> |
<div class="rtbOuter"> |
<div class="rtbMiddle"> |
<div class="rtbInner"> |
<ul class="rtbUL"> |
<li class="rtbItem rtbBtn"><a class="rtbWrap" ID="button1" href="#"><span class="rtbOut"><span class="rtbMid"><span class="rtbIn"><img alt="" src="Imagenes/image1.png" class="rtbIcon" /></span></span></span></a></li><li class="rtbItem rtbBtn"><a class="rtbWrap" ID="button2" href="#"><span class="rtbOut"><span class="rtbMid"><span class="rtbIn"><img alt="" src="Imagenes/image2.png" class="rtbIcon" /></span></span></span></a></li> |
</ul> |
</div> |
</div> |
</div><input id="toolBar_ClientState" name="toolBar_ClientState" type="hidden" /> |
</div> |
<script type="text/javascript"> |
$find("toolBar").attachEvent("OnClientClick","click_handler"); |
function click_handler(sender, e) |
{ |
if (sender.CommandName=='DELETE') { |
return confirm('¿Seguro de borrar este elemento?'); |
} |
} |
< |
What is happening here? Any solution for this?