Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Tue, 16 May 2006 19:20:35 +0530,    group: microsoft.public.dotnet.faqs        back       


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.
date: Tue, 16 May 2006 19:20:35 +0530   author:   Brahmam

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. 
> 
>
date: Sun, 28 May 2006 11:21:56 +0200   author:   Göran Andersson

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us