Notification throwing 404 error

2 posts, 0 answers
  1. Brian Garson
    Brian Garson avatar
    54 posts
    Member since:
    Jan 2008

    Posted 30 Sep 2011 Link to this post

    Hello,  

    I was wondering how I would change the values of  some of the generated code, specifically an image that has it's src set to "info" which creates a 404 error that I am catching using Fiddler.  Here is the view source of the generated HTML:
    <div id="ctl00_ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ContentPlaceHolder1_radNotificationWindow" disabled="disabled" style="display:none;">
        <div id="ctl00_ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ContentPlaceHolder1_radNotificationWindow_popup" class="RadNotification RadNotification_campDashboardNotification" style="height:53px;display:none;position:absolute;">
            <div class="rnTitleBar" id="ctl00_ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ContentPlaceHolder1_radNotificationWindow_titlebar" style="display:none;">
                <span class="rnTitleBarIcon"><img src="info" alt="" /></span><span class="rnTitleBarTitle"></span><ul class="rnCommands">
                    <li class="rnCloseIcon"><a href="href" title="Close" id="ctl00_ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ContentPlaceHolder1_radNotificationWindow_rnCloseIcon"></a></li>
     
                </ul>
            </div><div id="ctl00_ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ContentPlaceHolder1_radNotificationWindow_XmlPanel" class="RadXmlHttpPanel">
                <div id="ctl00_ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ContentPlaceHolder1_radNotificationWindow_C" class="rnContentWrapper">
                     
                <img src="../images/WarningIcon.png" alt="Warning" />
                Warning: Please ensure you are using a browser that Campaigner currently supports.
                <a href="#" onclick="ShowBrowserSupportWindow();return false;">Learn More</a>
                <a href="#" onclick="closeNotificationWindow(); return false;" class="lnkClose">
                    <img src="../Skins/Custom/Notification/campDashboardNotification_close.gif" alt="close" />
                </a>
     
             
                </div><input type="hidden" name="ctl00$ctl00$ctl00$ContentPlaceHolder1$ContentPlaceHolder1$ContentPlaceHolder1$radNotificationWindow$hiddenState" id="ctl00_ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ContentPlaceHolder1_radNotificationWindow_hiddenState" /><input id="ctl00_ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ContentPlaceHolder1_radNotificationWindow_XmlPanel_ClientState" name="ctl00_ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ContentPlaceHolder1_radNotificationWindow_XmlPanel_ClientState" type="hidden" />
            </div><div id="ctl00_ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ContentPlaceHolder1_radNotificationWindow_TitleMenu">
                <div class="RadMenu RadMenu_campDashboardNotification RadMenu_Context RadMenu_campDashboardNotification_Context    ">
     
                </div><input class="rmActive rmVertical rmGroup rmLevel1" id="ctl00_ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ContentPlaceHolder1_radNotificationWindow_TitleMenu_ClientState" name="ctl00_ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ContentPlaceHolder1_radNotificationWindow_TitleMenu_ClientState" type="hidden" />
            </div>
        </div><input id="ctl00_ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ContentPlaceHolder1_radNotificationWindow_ClientState" name="ctl00_ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_ContentPlaceHolder1_radNotificationWindow_ClientState" type="hidden" />
    </div>

    specifically this line: <img src="info" alt="" />

    and the aspx html before running:

    <telerik:RadNotification ID="radNotificationWindow" runat="server" OnClientShown="OnClientShown" Skin="campDashboardNotification" 
        Height="53" VisibleOnPageLoad="true" Pinned="true" Position="TopLeft" AutoCloseDelay="6000" EnableEmbeddedSkins="false" VisibleTitlebar="false" >
            <ContentTemplate>
                <img src="../images/WarningIcon.png" alt="Warning" />
                Warning: Please ensure you are using a browser that Campaigner currently supports.
                <a href="#" onclick="ShowBrowserSupportWindow();return false;">Learn More</a>
                <a href="#" onclick="closeNotificationWindow(); return false;" class="lnkClose">
                    <img src="../Skins/Custom/Notification/campDashboardNotification_close.gif" alt="close" />
                </a>
            </ContentTemplate>
        </telerik:RadNotification>

    Thanks
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 04 Oct 2011 Link to this post

    Hi Brian,

    The predefined icons are parts of the skins and thus when the predefined skins are disabled the predefined icons are disabled as well, as they are skin-specific, so if you are not using one of our skins the control has no way of knowing which icons it should use and, threfore, treats "info" as an url.

    This means that you would need to add the required icon files and use them as external images. If you still wish to use the embedded icons you can find them in the Skins folder of your Telerik installation. Skins\Common\Notification holds the default ones and if a skin has specific icons (for example the Black skin) you can locate the specific sprites in Skins\Black\Notification. You would most likely need to edit the images so that they are not sprites in order to use the ContentIcon. The other option is to use your own custom images that better fit the customized look of your skin.

    Since Q2 2011 SP1 there is another option - extracting the image from the webresource and setting it in the code-behind, for example:
    RadNotification1.TitleIcon = Telerik.Web.SkinRegistrar.GetWebResourceUrl(Me, GetType(Telerik.Web.UI.RadNotification), "Telerik.Web.UI.Skins.Common.Notification.info.png")



    All the best,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top