Return to Snippet

Revision: 37104
at December 4, 2010 01:21 by scholli

Initial Code
using Microsoft.SharePoint.WebControls;


//Add Page Status bar 
SPPageStatusSetter statusSetter = new SPPageStatusSetter();
statusSetter.AddStatus("Aktiviert", "Daten wurden erfolgreich übertragen.", SPPageStatusColor.Green);

//Set JavaScript function to remove Status Bar after 5 seconds
string jsFunction = @"<script type='text/javascript'>" +
					"window.setTimeout(function(){ SP.UI.Status.removeAllStatus(true); }, 5000);" +
Page.RegisterClientScriptBlock("RemoveStatusBar", jsFunction);

Initial URL

Initial Description

Initial Title
Show Status Bar through C# Code

Initial Tags

Initial Language