2
我想輸出在文本框中輸入的值到使用PowerShell的HTML,但我有點卡住了。這裏是我的代碼:轉換爲HTML與Powershell問題
$button1 = New-Object System.Windows.Forms.Button
$button1.Name = "button1"
$button1.Location = New-Object System.Drawing.Point(16, 350)
$button1.Text = "Create"
$button1.add_Click({ConvertTo-HTML -title "Email Signature" -body "<p>$textBox2.Text</p>"})
產生的HTML是...
System.Windows.Forms.TextBox, Text: Chris.Text
我怎樣才能使輸出僅僅是 「Chris
」?
工作了:)答案是:$($ textBox2.Text) – cvandal 2011-03-07 01:43:49