| Author: Rajeev 29 Nov 2004 | Member Level: Silver Points : 0 |
Button1.Attributes.Add("Onclick", "return confirm('Are You sure to Delete this Record')").
|
| Author: Sudhir Katiyar 03 Feb 2005 | Member Level: Bronze Points : 0 |
I have two queries. 1. Once i click on the insert button and after meeting certain conditions of the Code behind page this is fired
btnInsert.Attributes.Add("Onclick", "return confirm('PIN is currently assigned to " + strName + " , Would you like to re-assign?');")
but the Pop-up message is coming only after i click the Insert Button again.
Why the Pop-up window is not coming in single click of the insert button.
2. Suppose the user says OK to the POP-uP window than how to capture in Page_Load as the Pop-Up window is with flag OK so that i cud call some method to do the rest according to the functionality of my screen.
Can anyone help me at the earliest
my email id (sudhir.katiyar AT gmail DOT com)
|
| Author: Darious 04 Feb 2005 | Member Level: Silver Points : 0 |
Write the following code in the page_load event
btnInsert.Attributes.Add("Onclick", "return confirm('PIN is currently assigned to " + strName + " , Would you like to re-assign?');")
U need not bother about what user clicks ,When pop up meaasege comes user will have to click ok or cancel .In the javascript u just check if user clicks OK return true else Return false
If true will be returned then the button_click event will be fired else the event will not be fired(The page will not postback)
|
| Author: SS 15 Apr 2005 | Member Level: Bronze Points : 0 |
I'm new to .NET, where do i add ConfirmButton.Attributes.Add("onClick", "return ConfirmDelete();");
in Code behind. I mean in which event should i add this?
|
| Author: Dheeraj 31 Jan 2006 | Member Level: Bronze Points : 0 |
just write this code in pageload ....
id_of_button.Attributes.Add("Onclick", "return confirm('Confirmation message');")
|