Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2010
    Thanked 1 Time in 1 Post

    Write a WithEvents variable

    New to ASP.net.

    Working in Microsoft Visual Web Developer 2010 Express.

    Wrote a program with both HTML and Visual Basic.

    <asp:Button ID="Button1" OnClick="Button1_Click" Text="Get Rise and Set Times" runat="server" />
    Protected WithEvents Button1 As System.Web.UI.WebControls.Button
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    End Sub
    How do you write "OnClick="Button1_Click"" so that it will work?
    Last edited by Philosophaie; 07-03-2012 at 05:19 PM.

  2. #2
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Thanked 210 Times in 209 Posts
    on the open ASP page, click design (not something I usually recommend) and double click the graphical button. It will put the Sub in there for you. Once you get that down work towards coding it manually (in lieu of double clicking graphic)

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts