Go Back   Velocity Reviews > Newsgroups > DotNet
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

DotNet - javascript confirm in codebehind with C#

 
Thread Tools Search this Thread
Old 05-16-2006, 02:50 PM   #1
Default javascript confirm in codebehind with C#


Hi all,

Can anyone suggest me how to write the confirm box in code behind
and i want to get the return value whether the user clicked 'ok' or
'cancel',
Depending on that i need to process further using if else , I am able to
display the confirm by using the following code

cmdSubmit.attributes.add("onclick","return confrim('message');");

the equirement is i am uploading a file , if the file that was uploading was
already exists in that folder , I need to ask the user to confirm for
overwriting the existing one , in this case i need to display the confirm
and get the result as true or false ,

Anyone help me in this regard

Thanks in Advance,
Brahmi.




Brahmam
  Reply With Quote
Old 05-28-2006, 10:21 AM   #2
=?ISO-8859-1?Q?G=F6ran_Andersson?=
 
Posts: n/a
Default Re: javascript confirm in codebehind with C#

Instead of returning the value from the event code, put the value in a
hidden field, and return true from the event code.

Brahmam wrote:
> Hi all,
>
> Can anyone suggest me how to write the confirm box in code behind
> and i want to get the return value whether the user clicked 'ok' or
> 'cancel',
> Depending on that i need to process further using if else , I am able to
> display the confirm by using the following code
>
> cmdSubmit.attributes.add("onclick","return confrim('message');");
>
> the equirement is i am uploading a file , if the file that was uploading was
> already exists in that folder , I need to ask the user to confirm for
> overwriting the existing one , in this case i need to display the confirm
> and get the result as true or false ,
>
> Anyone help me in this regard
>
> Thanks in Advance,
> Brahmi.
>
>

  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump