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
765 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 36

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
Suggested Courses
Course of the Month10 days, 21 hours left to enroll

631 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