Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 6th, 2006, 09:41 AM
Authorized User
 
Join Date: Dec 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar
Thanks a lot.I am trying to research on it.I will do it few more hours and if not i will let it go the way it is.But i am really greatful to you for helping me out on this.
Regards,
Kamal
 
Old December 6th, 2006, 12:42 PM
Authorized User
 
Join Date: Dec 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,
There is a dropdown list on same page.And when i change the option of drop down list the xit function is being fired again.
I tried to add this to the page_load but didnt help
db_drpPayee.Attributes.Add("onselectedindexchange" ,"needToConfirm=false; return true;");

Also when the option in thid dropdown changes the grid reloads.So i am not sure this exit function is being fired on grid reload or drop down list change.But what event can i use for grid reload?

Thanks
Kamal
 
Old December 6th, 2006, 01:05 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

The *client side* event you're looking for is called onchange, not onselectedindexchange...

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old December 6th, 2006, 02:24 PM
Authorized User
 
Join Date: Dec 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I did it.The event that worked for this case is onclick.

Thanks
Kamal
 
Old February 27th, 2007, 02:23 PM
Registered User
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am attempting to use a simple OnClientClick using ASP.NET2.0

The code is a follows, but it simply will not work..

<asp:Button ID="Button1" runat="server" OnClientClick="return('Are you sure you want to delete this record.')" Text="Delete Record" />

Any thoughts...
 
Old February 27th, 2007, 03:40 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You need to confirm the message...

E.g.: return confirm(YourMessage);

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a button in javascript in asp.net ? coolcoder2007 ASP.NET 2.0 Basics 0 October 26th, 2007 04:14 AM
In ASP,Client side javaScript code casimir Classic ASP XML 0 October 24th, 2005 12:24 AM
How to add client-side script to an ASP button BrianWren VB.NET 1 March 30th, 2005 05:27 PM
sessions wont persist bogins Beginning PHP 2 April 22nd, 2004 01:56 PM
ASP Upload - does object persist across pages? James Diamond Classic ASP Components 4 January 27th, 2004 09:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.