Solved

ASP.Net web page does not display ascx customcontrol but I can see the control contents when I "View Source"

Posted on 2014-01-29
2
728 Views
Last Modified: 2014-02-10
I have an existing ASP.Net website project that has just been handed over to me. This project has an initial login.aspx page that, in addition to the typical username and password fields,  is supposed to display a custom user control at the bottom that shows a clickable image that is a link to http://www.livehelpnow.net.

I was told that this image link was visible as recently as last Friday (1/24/14). Now, when you view the page, you do not see the image or the link.

I have checked file dates on all of the files and none of them have a date modified stamp more recent than 1/13/14

If I view source for the page, I can see the Span and Divs associated with the control. It is just not showing up on the actual page.

Here is a link to the login page

https://secure.confirmdelivery.com/MAILNet/Login.aspx

The custom user control is listed at the bottom of the login.aspx page as follows;


--------start snip---------------------------------------------------------
                     </form>
        </center>
        <UserControls:OnlineHelp id="ucOnlineHelp" runat="server"></UserControls:OnlineHelp>
       </BODY>
</HTML>
-------- end snip---------------------------------------------------------

The custom control is referenced in the web.comfig, <system.web><pages><controls> section, as follows;

--------start snip---------------------------------------------------------

<add tagPrefix="UserControls" src="~/CustomControls/ctlOnlineHelp.ascx" tagName="OnlineHelp"/>

-------- end snip---------------------------------------------------------


Below is the contents of the ctlOnlineHelp.ascx file;


--------start snip---------------------------------------------------------

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ctlOnlineHelp.ascx.vb" Inherits="MAILnet.ctlOnlineHelp" %>

<asp:Label ID="lblOnlineHelp" runat="server" Text="OnlineHelp"></asp:Label>

-------- end snip---------------------------------------------------------

Listed below are the contents of the code-behind file, ctlOnlineHelp.ascx.vb.

--------start snip---------------------------------------------------------

Imports System.Configuration.ConfigurationManager
Imports System.Text

Public Class ctlOnlineHelp
    Inherits System.Web.UI.UserControl

#Region " Protected Methods "
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Try
            Me.lblOnlineHelp.Text = DHO.ReadFile(DHO.gSiteRoot & DHO.GetBrandingSession.BrandingFilePath & "Scripts\OnlineHelp_V3.js")
        Catch ex As Exception
            Throw New Exception(ex.Message)
        End Try
    End Sub
#End Region

End Class

-------- end snip---------------------------------------------------------

So, the label in the custom control is being filled with the OnlineHelp_v3.js

I can see all of the above code, including the contents of the OnlineHelp_v3.js, played out when I select "view source" for the login.aspx page.

What is preventing it from displaying on the actual page?

Thanks in advance,

Dave
0
Comment
Question by:dcadler
2 Comments
 
LVL 35

Accepted Solution

by:
Miguel Oz earned 500 total points
ID: 39819680
Which browser (version) are you having this issue?
I checked your link with IE9 and it is displaying the icon as Offline in the RHS of the page.

You may have a browser incompatibility issue (Check if the browser has been updated recently). I will also check if the user control is throwing any exceptions.
0
 

Author Closing Comment

by:dcadler
ID: 39848727
Actually, The problem was related to a missing image file. When I contacted the livehelp vendor, they were able to tell me what file was missing. When I replaced the image file, it started working.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Lync server 2013 Backup Service Error ID 4049 – After File Share Migration
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

709 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now