cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Jono
Champion Sweeper II
Can someone give me the code necessary for a custom widget that will display a graphic from a URL. Here's what I want to display:

http://weathersticker.wunderground.com/weathersticker/big2_cond/language/english/US/MI/Detroit.gif

How can I do that?

Thanks,
Jono
2 REPLIES 2
Hemoco
Lansweeper Alumni
You can use the Iframe widget for this, no special code is needed
Jono
Champion Sweeper II
Lansweeper wrote:
You can use the Iframe widget for this, no special code is needed

Using the Iframe displayed the picture, but it also displayed a graphic behind the picture saying "The content cannot be displayed in a frame." Since the picture isn't big enough to cover the error graphic, using an Iframe wouldn't work.

I don't know anything about C#, but I figured out I could use this:
<%@ Page Language="C#" AutoEventWireup="true" Inherits="LS.BaseControl" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="LS" %>
<% Response.CacheControl = "no-cache";%>
<% Response.AddHeader("Pragma", "no-cache"); %>
<% Response.Expires = -1; %>
<%  LS.User.Current().CheckWebsiteAccess(); %>
 
<table align="center">
<td align="center">
<span style='display:block !important; width: 488px; text-align: center; font-family: sans-serif; font-size: 12px;'><a href='http://www.wunderground.com/cgi-bin/findweather/getForecast?query=Detroit, MI' title='Detroit, MI Weather Forecast' target="_blank"><img src='http://weathersticker.wunderground.com/weathersticker/big2_cond/language/english/US/MI/Detroit.gif' alt='Find more about Weather in Detroit, MI' /></a></span>
</td>
</table>

That works great, though C# purists may cringe at the messiness or incompleteness of the code. I really don't know what the top portion means or does, but I know HTML enough to create the bottom part. Anyway, it works.

Thanks for your help!

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now