Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 30th, 2005, 04:18 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default How to add client-side script to an ASP button

I want to add an onclick="MyFunction();" property to an asp control defined in the following way:

<asp:button id=cmdDelete runat="server" Width="120px" Text="Delete"></asp:button>

I tried

<asp:button id=cmdDelete runat="server" onclick="DeleteConfirm();" Width="120px" Text="Delete"></asp:button>

but that generates an error, as VB.NET doesn't know how to handle the onclick="" instruction.

How do you add client-side calls to JScript on an ASP.NET web page?
Reply With Quote
  #2 (permalink)  
Old March 30th, 2005, 04:27 PM
Imar's Avatar
Wrox Author
Points: 67,253, Level: 100
Points: 67,253, Level: 100 Points: 67,253, Level: 100 Points: 67,253, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,225
Thanks: 66
Thanked 1,413 Times in 1,393 Posts
Default

Hi Brian,

Take a look at this FAQ: http://imar.spaanjaars.com/QuickDocId.aspx?QUICKDOC=355

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Strugglin' by Tricky (Track 11 from the album: Maxinquaye) What's This?
Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing Client side script in code-behind asp.net sajid_pk ASP.NET 2.0 Basics 1 February 11th, 2005 03:22 AM
Writing client side script in code-behind asp.net sajid_pk ADO.NET 1 January 13th, 2005 07:12 AM
writing client-side script in code-behind asp .net sajid_pk General .NET 1 January 13th, 2005 07:11 AM
please help ping with client side script nlicata VBScript 0 June 10th, 2004 01:44 AM



All times are GMT -4. The time now is 07:21 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.