Here's what I did for one portlet, stock quotes panel.
We have a gadget that displays stock quotes. We have an account with Tickertech to provide us with quotes information. There are user settings that allow people to add the gadget to their personal page, and then select the shares that are of interest to them as individuals. You can also select the columns to display. This is achieved using JavaScript. The selected stock symbols are sent along with a token that identifies the request as coming from a valid client.
- - JavaScript. , , Tickertech.
Webpart. WSPBuilder Visual Studio. , , , , , .
- , script.
public class MarketSummaryWP : Microsoft.SharePoint.WebPartPages.WebPart
{
string m_scriptBlockPre = "<script language='javascript'> \n"+
CreateChildControls() .
this.Controls.Add(new LiteralControl(this.Script));
script . , script .
[WebBrowsable(false),
WebDisplayName("Script"),
WebDescription("The JavaScript to insert in the page.")]
public string Script
{
get { return m_scriptBlockPre + m_stockSymbolsList + m_scriptBlockPost; }
}
[Personalizable(PersonalizationScope.User), WebBrowsable(true),
WebDisplayName("Stock Symbols"),
WebDescription("The stock symbols to retrieve quotes for, seperated by commas.")]
public string StockSymbols
{
get { return m_stockSymbolsList; }
set { m_stockSymbolsList = value; }
}
string m_stockSymbolsList = "GE,CAT,$DJI,AMR,JNJ,";
string m_scriptBlockPost = " *other JavaScript code* </script> \n"+
-, , -. -, - html, JavaScipt , , " ", , HTML-, , JavaScipt; . , -, .