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