ASP.NET Equivalent of "Submit" Button

Discussion in 'ASP.NET 2.0' started by Himself, Oct 28, 2008.

  1. Maybe I'm missing something, but I don't see how this button would know that the desired action is "mailto:" or, if it did, the desired email address. I suspect more is required . . .
     
  2. Hi,
    On my Contact page: http://msftwise.com/contact/

    The code for the submit button is:

    <asp:Button runat="server" ID="SendEmail" Text="Send Message" ToolTip="Send a message" />

    The code behind for that button event is:
    Protected Sub SendEmail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SendEmail.Click
    // Your code here
    End Sub


    Technical Evangelist for DiscountASP.NET
    http://www.iis7test.com/webcasts/
    http://weblogs.asp.net/markwisecarver/
    http://blogs.windowsclient.net/wisecarver/default.aspx
     
  3. I'm using ASP.NET forms as I needthe validation tools, but I wish to have a "Submit" button as with HTML forms to send the completed form's contents to ahard-coded email address. I can't believe that I'm the only one who has need for this, so there must be something out there that I'm missing. I use VB if and Visual Web Developer 2008 Express if that makes a difference.

    Thanks.
     
  4. Try using the .Net button control.

    ---------------
    <form runat='server'>
    <asp:Button id='b1' Text='Submit' runat='server' />
    </form>
    ----------------

    rcp
    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page