Go Back   CodingForums.com > :: Server side development > ASP.NET

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-03-2012, 02:13 PM   PM User | #1
Philosophaie
New Coder

 
Join Date: Sep 2010
Posts: 46
Thanks: 1
Thanked 1 Time in 1 Post
Philosophaie is an unknown quantity at this point
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.

Code:
<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
   'code
End Sub
How do you write "OnClick="Button1_Click"" so that it will work?

Last edited by Philosophaie; 07-03-2012 at 04:19 PM..
Philosophaie is offline   Reply With Quote
Old 07-03-2012, 07:39 PM   PM User | #2
alykins
Senior Coder

 
alykins's Avatar
 
Join Date: Apr 2011
Posts: 1,608
Thanks: 37
Thanked 183 Times in 182 Posts
alykins will become famous soon enough
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
alykins is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:19 AM.


Advertisement
Log in to turn off these ads.