|
-
Jun 27th, 2006, 10:14 PM
#1
Thread Starter
Junior Member
showing message box from server side (client/server inline code)
Hi,
In my application on Submit button, I want to do the following in same sequence;
1. Check Duplicate in DB
2. If Exists send message to user
3. If user says Yes then insert into db
4. If user says no don't do anything
On submit button I can check duplicates in DB in code behind file, if exists how can I send a message to user and take his input, I tried
Response.Write("<Script Language=Javascript> confirm("duplicate!!") </Script>");
but it doesn't work.
Can anyone tell me how can I acheive the above.
thanks,
-
Jun 27th, 2006, 10:16 PM
#2
Re: showing message box from server side (client/server inline code)
I have this at work and can get you the code that works for sure tomorrow morning... But I think you need to use alert instead of confirm. I can't verify that for sure right now. =/
-
Jun 28th, 2006, 09:20 PM
#3
Thread Starter
Junior Member
Re: showing message box from server side (client/server inline code)
Thanks, much appreciated,
I will wait for your reply.
thanks,
-
Jun 28th, 2006, 09:31 PM
#4
Re: showing message box from server side (client/server inline code)
>< >< ><
I forgot to check this morning. FIrst thing tomorrow, I'll post it.
-
Jun 29th, 2006, 07:19 AM
#5
Re: showing message box from server side (client/server inline code)
VB Code:
Dim scriptString As String
scriptString = "<script language=JavaScript>"
scriptString &= "alert('" + message + "');"
scriptString &= "</script>"
Page.RegisterStartupScript("ShowMessage", scriptString)
-
Jun 30th, 2006, 02:19 PM
#6
Thread Starter
Junior Member
Re: showing message box from server side (client/server inline code)
Thanks Buddy, I think I was not that clear in my post;
You solution has the same behaviour as
Response.Write("<Script Language=Javascript> confirm("duplicate!!") </Script>");
It doesn't stop processing on message box. What I need is it should stop/halt processing while message box is displayed and as soon as user click Yes or No on message box application should perform certain steps accordingly.
-
Jul 1st, 2006, 01:47 PM
#7
Re: showing message box from server side (client/server inline code)
You cannot do that. The page is executed as a whole.
If you want something like this, then redirect the page when an error occurs in your logic with a confirmation question, after which you could redirect back.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|