2017-03-20 3 views
0

修正方法や間違っていることがわかりませんか?助けてください....ボタン2のテキストがボタン1のテキストボックスに表示されています - VS Express 2013 -

Partial Class _Default 
Inherits System.Web.UI.Page 

Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles ariesText.Click 
    Me.displayText.Text += "Aries'The Ram' March 21 - April 19 Aries people are creative, adaptive, and insightful. They can also be strong-willed and spontaneous (sometimes to a fault)." 

End Sub 

Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles taurusText.Click 
    Me.displayText.Text += "Taurus 'The Bull' April 20 - May 20 Taurus zodiac signs and meanings, like the animal that represents them, is all about strength, stamina and will. Stubborn by nature, the Taurus will stand his/her ground to the bitter end (sometimes even irrationally so)." 

End Sub 
End Class 

答えて

0

を私はあなたが看板+は削除すべきだと思う、私は12個のボタンを作成してい

Partial Class _Default 
    Inherits System.Web.UI.Page 

    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles ariesText.Click 

     Me.displayText.Text = "Aries'The Ram' March 21 - April 19 Aries people are creative, adaptive, and insightful. They can also be strong-willed and spontaneous (sometimes to a fault)." 

    End Sub 

    Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles taurusText.Click 

     Me.displayText.Text = "Taurus 'The Bull' April 20 - May 20 Taurus zodiac signs and meanings, like the animal that represents them, is all about strength, stamina and will. Stubborn by nature, the Taurus will stand his/her ground to the bitter end (sometimes even irrationally so)." 

    End Sub 

End Class 
+0

を(それがテキストを追加します、あなたのケースでは、あなたはそれを上書きする必要がある)と、占星術webformのための12のテキストボックス。だから最初の質問はあなたが何のサインですか?私はそれぞれのボタンのすべての黄道帯の看板を入れようとしているし、彼らは自分の看板を選択すると、テキストは私がテキストフィールドに入力した特性を表示する必要があります。うまくいくと思います.... –

+0

12のテキストボックスを使用する場合、なぜ値を 'Me.displayText'に設定するのですか? – Hadi

関連する問題