Jinsi ya kutumia rasilimali File katika SharePoint 2007

Kujenga Rasilimali faili kutumia Visual Studio IDE

Nakala faili rasilimali katika 12 mizinga ya rasilimali folder

GetLocalized njia kutoka SPUtility kusoma kutoka faili maadili rasilimali

Syntax:

SPUtility.GetLocalizedString(“$Rasilimali:<<ResourceFileName,ResourceKeyName>>”, “<<ResourceFileName>>”, muda mrefu);

Mfano:

SPUtility.GetLocalizedString(“$Rasilimali:MyResources,FIRSTNAME”, “MyResources”, muda mrefu);

Chanzo sampuli:

kutumia System;

kutumia System.Runtime.InteropServices;

kutumia System.Web.UI;

kutumia System.Web.UI.WebControls;

kutumia System.Web.UI.WebControls.WebParts;

kutumia System.Xml.Serialization;

kutumia Microsoft.SharePoint;

kutumia Microsoft.SharePoint.WebControls;

kutumia Microsoft.SharePoint.WebPartPages;

kutumia Microsoft.SharePoint.Utilities;

namespace ResourceFile

{

[Guid(“fc643df7-8836-41bf-913f-662ed57e659a”)]


umma
darasa
ResourceCollection : System.Web.UI.WebControls.WebParts.WebPart

{


string FIRSTNAME;


string Jina la familia;


umma ResourceCollection()

{

}


kulindwa
override
utupu CreateChildControls()

{


msingi.CreateChildControls();


uint lang = SPContext.Current.Web.Language;

FIRSTNAME = SPUtility.GetLocalizedString(“$Rasilimali:MyResources,FIRSTNAME”, “MyResources”, muda mrefu);

LastName = SPUtility.GetLocalizedString(“$Rasilimali:MyResources,Jina la familia”, “MyResources”, muda mrefu);

}


kulindwa
override
utupu Atatoa(HtmlTextWriter mwandishi)

{

writer.Write(“Thamani ya Jina la kwanza kutoka nyenzo ya faili : “ + FIRSTNAME);

writer.Write(“Thamani ya Jina la Mwisho kutoka nyenzo ya faili : “ + Jina la familia);

}

}

}

1 maoni kwa Jinsi ya kutumia Rasilimali File katika SharePoint 2007

BBC

Unaweza kutumia haya HTML

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>