使用按钮

时间:2017-04-23 14:47:23

标签: c#

我想从另一个表单打开一个表格按钮。 我怎么能这样做?

private void button1_Click(object sender, EventArgs e)
{
Form Grondstoffen = new Form();
Grondstoffen.Show();
}
}

我曾尝试编写此代码,但这会打开一个Total different Form。

1 个答案:

答案 0 :(得分:2)

只需将 private void button1_Click(object sender, EventArgs e) { myForm Grondstoffen = new myForm(); Grondstoffen.Show(); } 替换为 <paper-input label="Geef je naam" value="{{naam}}"></paper-input> <paper-input label="telefoon nummer" value="{{telnr}}"></paper-input> <paper-button on-tap="contactToevoegen">Voeg contact toe</paper-button> {{naam}} {{telnr}} <iron-ajax id="ajax-contact-toevoegen" method="POST" url="/cgi-bin/contact-toevoegen.py" handle-as="json" on-response="contactToevoegen_ResponseHandler"> </iron-ajax> </template> <script> Polymer({ is: "contact-form", contactToevoegen: function() { this.$.ajax-contact-toevoegen.contentType="application/json"; this.$.ajax-contact-toevoegen.body={naam: this.naam, telnr: this.telnr}; this.$.ajax-contact-toevoegen.generateRequest(); console.log( "Contact: " + this.naam + ", " + this.telnr); } }); </script> </dom-module> ,例如,如果您要打开名为 myForm 的表单

If Session("LoggedOn") = "NO" Then
    Response.Redirest("MainPage.aspx", False) 'False to indicate that the rest of the code in the procedure is not to be executed.
End IF