Interaction with Message box from Web site

  • Thread starter Thread starter Rob Manger
  • Start date Start date
R

Rob Manger

Hi All,
I have a problem I would love to be able to solve easily.
I want to be able to display a MessageBox from an ascx page with yes and no
buttons, then process the result from withing the ASCX code.

Considering the following psuedocode, I want the messagebox to appear at
<<Prompt>>. Is there any way I can do this?

Any help would be hugely appreciated

Rob Manger

============Code==============
private void btn_Click()
{
if (CheckA())
{
if (CheckB())
{
<<Prompt>>
If(Yes)
{
Continue()
}
else
{
Cancel and Set focus on textbox
}
}
}
}
 
jscript. the button click implies a postback event. use jscript to set
the value of a hidden textbox and resubmit the form.
 
Hi,

I'd rather say the original poster should use __doPostBack from the client
JScript code to generate a postback event.
Also, the original code snippet should be split in two parts - the first one
rendering the JScript code for displaying the prompt and doing the postback,
and the second one handling the postback event.
 
Back
Top