0
사용자가 웹 파트 속성에 사용자 지정 텍스트를 입력 할 때. 양식에 표시됩니다. Sharepoint 사용자 지정 텍스트 웹 파트 속성
이
는 나는 form.This 페이지에 텍스트를 표시해야public partial class testTextWebPart: WebPart
{
private string _customtxt;
[WebBrowsable(true),
Category("Miscellaneous"),
Personalizable(PersonalizationScope.Shared),
WebDisplayName("Enter some text")]
public string CustomTextProp
{
get
{
return _customtxt;
}
set
{
_customtxt = value;
}
}
이
<script type="text/javascript">
function NAME() {
var ctx = new SP.ClientContext.get_current();
var webURL = ctx.get_url;
var newFormURL = window.location.protocol + '//' + window.location.host + webURL + '/Lists/Testpage/NewForm.aspx';
var options = SP.UI.$create_DialogOptions();
options.title = 'PAGE TITLE';
options.url = newFormURL;
SP.UI.ModalDialog.showModalDialog(options);
}
testTextWebPart.ascx
입니다하여 testTextWebPart.ascx.cs에있는 웹 파트 속성에 대한 코드입니다
여기에 표시해야합니다. 내 컨트롤 템플릿 폴더에이 페이지를 내가 사용자가으로 newform를 클릭 할 때는 WebPart 속성을 통해 텍스트를 사용자 ENTERE를 얻을하고 폼에 표시 할 필요가 testText.ascx
<div id="divForm" runat="server" style="width:400px; margin-left:auto; margin-right:auto; margin-top:10px;">
<div style="margin-bottom:10px;"> DISPLAY HERE </div>
인이됩니다 .
당신이 날 다운이가하는 일에 실행 줄 수 있을까? – HeliosAsra
http://msdn.microsoft.com/en-us/library/office/ms415817(v=office.14).aspx를 참조하십시오. –