Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excuting code-behind, Javascript and going back to code-behind

Status
Not open for further replies.

vilrbn

Programmer
Oct 29, 2002
105
0
0
FR
Hello,

I'm using code-behind (VB code) to search dupe records.
In case there are some, I inform the user with a confirm box.
If the user clicks on "OK", I save the record using code-behind.

I know how to send a confirm box, get back the confirm result on code-behind side and save data.
But don't know how to launch a confirm in certain cases, after code-behind execution...and continue to process code-behind after user validation.

Is it possible ?
 
It would require some extra trips to the server.

You may want to consider spitting back a page after processing that contains the confirm dialog, then doing further processing based on that.

Here's an example of embedding a script in a page using a label:

Code:
if( true )
{
lblRedirectScript.Text = &quot;<SCRIPT language=&quot; + Chr(34) + &quot;javascript&quot; + Chr(34) + &quot;>window.open(&quot; + Chr(34) + &quot;[URL unfurl="true"]www.tek-tips.com&quot;[/URL] + Chr(34) + &quot;)</SCRIPT>&quot;;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top