2010-12-13 11 views
0

SharePointサーバー2010の最初のカスタムWebパーツ(ビジュアルWebパーツ)を作成しています。SharePointカスタムWebパーツの入力コントロールの使い方は?

ドラッグアンドドロップでいくつかのコントロール(テキストボックス)を追加し、新しいサイトを作成するためにフォームに使用しました。

私が初めてサイトが、2番目を作成するときにそれが動作

newWeb = SPContext.GetContext(HttpContext.Current).Web.Webs.Add(
siteUrl, siteName, siteDescription, (uint)1033, "STS#1", true, false); 

私はいつも

string siteName = txtSiteName.ToString(); 
    string siteDescription = txtSiteDescription.ToString(); 

を使用すると考えていた。そして(コードのほんの一部)私が得る時間

<nativehr>0x800700b7</nativehr><nativestack></nativestack> 
The Web site address "/mySite/System.Web.UI.WebControls.TextBox" is already in use. 

ウェブパーツを作成するとき、私はどのようにウェブフォームコントロールを使用すると思いますか?

ありがとうございます。

答えて

1

Iは

string siteName = txtSiteName.Text; 
    string siteDescription = txtSiteDescription.Text; 
)私は.textセクションの代わり.ToStringを(使用する必要が実現
関連する問題