Jquery Notification Popups - jquery and updatepanels
<p>Hi i want notifications to popup if the need arises. I am using an asp.net timer which checks if a new message has arrived. The problem i am getting is that the jquery notification does not show up. I am guessing this is something to do with the update panel. Because when i tried calling it from pageload it worked fine. Here is my code;</p>

<pre><code>    protected void updateTimer_OnTick(object sender, EventArgs e)
    {
        Cache Cache = new Cache();

        users = Cache.getUserDetailsByUserID(Convert.ToInt32(Page.User.Identity.Name));

        if (users._bNewNotification)
        {
            List&lt;UserNotification&gt; listUserNotification = null;

            listUserNotification = Cache.getLatestNotifcationsByUserID(Convert.ToInt32(Page.User.Identity.Name));

            foreach (UserNotification userNotification in listUserNotification)
            {
                StringBuilder jquery2 = new StringBuilder();

                jquery2.AppendLine("$.extend($.gritter.options, {");
                jquery2.AppendLine("position: 'bottom-left',");
                jquery2.AppendLine("fade_in_speed: 100,");
                jquery2.AppendLine("fade_out_speed: 100,");
                jquery2.AppendLine("time: 3000");
                jquery2.AppendLine("});");
                Page.ClientScript.RegisterStartupScript(typeof(Page), Guid.NewGuid().ToString(), jquery2.ToString(), true);

                StringBuilder jquery1 = new StringBuilder();
                jquery1.AppendLine("   var unique_id = $.gritter.add({");
                jquery1.AppendLine("        title: 'This is a sticky notice!',");
                jquery1.AppendLine("        text: '" + userNotification._NotificationType + "',");
                jquery1.AppendLine("        image: 'http://s3.amazonaws.com/twitter_production/profile_images/132499022/myface_bigger.jpg',");
                jquery1.AppendLine("        sticky: true,");
                jquery1.AppendLine("        time: '',");
                jquery1.AppendLine("        class_name: 'my-sticky-class'");
                jquery1.AppendLine("    });");
                Page.ClientScript.RegisterStartupScript(typeof(Page), Guid.NewGuid().ToString(), jquery1.ToString(), true);
            }

            users._bNewNotification = false;
            users.UpdateNewNotification();

            Cache.RemoveUserProfileCacheByUserID(users._USERS_ID);
        }
    }
</code></pre>

<p>Can someone help me figure out what it is i am doing wrong, thanks</p>
