Angela4eva
asked on
Asp.net RegisterClientScriptBlock
I am calling this javascript from my asp.net. Can some one please let me know how i can catch whether user select Ok or cancel and do something?
ScriptManager.RegisterClie ntScriptBl ock(Page, Page.GetType(), "showmessage", "confirm('" + strmsg + "');", true);
i want to know whether the use click Ok or cancel and do if Ok return and Cancel nothing
ScriptManager.RegisterClie
i want to know whether the use click Ok or cancel and do if Ok return and Cancel nothing
if(confirm(' + strmsg + ')){ MyFunctionOnSuccess() }
ASKER
where should i put this line?
ScriptManager.RegisterClie ntScriptBl ock(Page, Page.GetType(), "showmessage", "if(confirm(' + strmsg + ')){ MyFunctionOnSuccess() };", true);
ASKER
I want to execute the next step if ok, otherwise(Cancel) I want to return.
I do not want to call a function.
I do not want to call a function.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
next step is next line after
ScriptManager.RegisterClie ntScriptBl ock(Page, Page.GetType(), "showmessage", "if(confirm(' + strmsg + ')){ MyFunctionOnSuccess() };", true);
even the your script form does not work.
ScriptManager.RegisterClie
even the your script form does not work.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
tahnks