Click here to Skip to main content
15,905,325 members

Comments by Member 12690322 (Top 1 by date)

Member 12690322 16-Mar-22 15:01pm View    
I’m not sure if this is going to help but here is a more detailed answer with more code. There is a timer on the page that calls a method called GenerateEventAwardDetailsCall. This method uses a StringBuilder to create the marquee shown below.

sb.Append("<marquee behavior="SCROLL" height="25" width="600">"
+ dr["Field6b"].ToString() + " "
+ strMarquee1
+ dr["Field3a"].ToString() + " - "
+ dr["Field4a"].ToString() + "..."
+ strMarquee2
+ dr["Field5a"].ToString() + " - "
+ dr["Field6a"].ToString() + "...."
+ dr["Field6b"].ToString() + "
" + GetEventStatus(EventID, UserID) + "");

The method GetEventStatus contains this code and this is where the NULL message for the UpdatePnael is occurring.
if (!Page.IsPostBack)
{
strReturn += "";
strReturn1 += "";

strReturn2 += "$('#cdown').countdown(\"" + GenerateEventTimeDetails2(EventID, UserID) + "\")";
strReturn2 += ".on('update.countdown', function(event) {";
strReturn2 += "var format = '%-D days %-H hours %-M minutes %-S seconds';";
strReturn2 += "$(this).html(event.strftime(format));";
strReturn2 += "})";
strReturn2 += ".on('finish.countdown', function(event)";
strReturn2 += "{";
strReturn2 += "$(this).html('Please Wait, Refreshing ...')";
strReturn2 += ".parent().addClass('disabled');";
strReturn2 += "});";

strReturn1 += "";
strReturn1 += "";
strReturn1 += "";
ScriptManager.RegisterClientScriptBlock(UpdPanel, typeof(UpdatePanel), UpdPanel.ClientID, strReturn1, false);
ScriptManager.RegisterStartupScript(UpdPanel, typeof(UpdatePanel), UpdPanel.ClientID, strReturn2, true);
}