CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 8/11/2007 2:41:24 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 851 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
jcnet
Asp.Net User
Button OnclientClick and Attribute.Add("onclick not working now that on asp.net 2.0 and master page??8/11/2007 2:41:24 PM

0

Hi. I have a simple page, that I moved to asp.net 2.0 and to a masterpage/content page design. I'm trying to get a simple confirmation popup to work and have tried both onclientclick in the button on the markup and in attribute add in the page load, neither are working.

 
my code: 

===in markup 

 <asp:Button OnClientClick="return confirm('OK to Delete?');"  ID="DeleteButton" SkinID="Button" runat="server" CommandName="Delete"  Text="Delete" OnClick="Delete"></asp:Button>


=== from code:

 DeleteButton.Attributes.Add("onClick", "return confirm('Are you sure?')")

 

What up?

 
Thanks for any help or information!

....

mystery
Asp.Net User
Re: Button OnclientClick and Attribute.Add("onclick not working now that on asp.net 2.0 and master page??8/11/2007 3:38:54 PM

0

Hi, jcnet.

This one works for me:

<asp:Button ID="Button1" runat="server" OnClientClick="return confirm('OK to Delete');" onclick="Button1_Click" Text="Button" />

 If it doesn't work on your side then the problem is with your browser (may be it blocks JavaScript)

I hope this helps

Amanda Wang - M
Asp.Net User
Re: Button OnclientClick and Attribute.Add("onclick not working now that on asp.net 2.0 and master page??8/14/2007 9:54:36 AM

0

Hi,

The over all settings for Internet Explorer scripting can be found at the following URL:

http://www.apl.org/libcats/enable.html


Hope it helps.


Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
Button OnclientClick and Attribute.Add("onclick not working now ... Button OnclientClick and Attribute.Add("onclick not working now that on asp.net 2.0 and master page?? Last post 08-11-2008 5:01 AM by ...
Disable Submit Button w/OnClientClick: Not Working - ASP.NET Forums I Google'd "OnClientClick Property with validation" (see ... <%@ Page Language=" VB" MasterPageFile="~/MasterPage.master" ... ATTEMPT #2 Add "javascript:this. disabled=true;" to submit ... Me.btnSubmit.Attributes.Add("onclick", Me.Page. ClientScript. .... Channel 10: Netflix Now On Media Center ...
Disable Submit Button w/OnClientClick: Not Working - W3Schools Forum Disable Submit Button w/OnClientClick: Not Working ... ATTEMPT #1 Add "this. disabled=true;" to submit button's OnClientClick property directly to the asp. net web ... Me.btnSubmit.Attributes.Add("onclick", Me.Page.ClientScript. .... 1 User(s) are reading this topic (1 Guests and 0 Anonymous Users) ...
.NET - Calling JavaScript from ASP.NET Master Page and Content ... Add a TextBox and a Button control in the MasterPage (outside the ContentPlaceHolder) as shown below .... GridView Tips and Tricks using ASP.NET 2.0 ...
Combining JavaScript with ASP.NET Web forms - Program - .Net ... The OnClick attribute of the ASP.NET Button tells the system what ... how to link from your asp.net page to your html/javascript page, but not the other ... Now i have added the OnClientClick="return confrim('Are your sure');" with ... However, it does work out on a content page when using asp.net 2.0 master page. ...

Button OnclientClick and Attribute.Add("onclick not working now ... Button OnclientClick and Attribute.Add("onclick not working now that on asp.net 2.0 and master page??, > ROOT > NEWSGROUP > Asp.Net Forum ...






read the zipcode from db and populate city and state ?

radio buttons

validate xml with xsd in c#

help please

really simple 'newbie' question re forms

scheduling an execution of a aspx page

redirect problem

masterpages, how to create a feedback region?

assigning value and text to drop down list items.

expressionbuilder problem in vs

how do i go to bottom of the page each time the page is loaded?

slow response

the wright way?

public variables

how to configure download dialog...

httphandlers and httpmodules

question using vbc.exe

a local variable named '...' is already defined in this scope compile error

arghhhh!! where is  coming from????

wizard navigation

how to get a filespec

parameter is not valid and out of memory.

automatically run on server ?

get rid of iframe horizontal scroll bar

add a confirmation dialog before processing...

regex help - strip down hyperlink html.

database connection performance

custom validation and wizard control

usercontrols

can someone help me with dotnetcharting?

   
  Privacy | Contact Us
All Times Are GMT