Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Action after confirmation from client -- asp.net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sweetpotatop@yahoo.com - 21 Sep 2007 18:31 GMT
Hi,

I have an asp.net project written in C#

It has a list of records for users to delete and select. When user
click the "Delete" button, I would like to ask the user to confirm
before I proceed.

And I have something like this in my code
button1.Attributes.Add("onClick", "return confirm('Some Prompt');");

If the user says yes, I have to run the code in server, which will
delete the records.

My question is, how does the server-side code gets the return value of
the confirmation, which I believe on the client-side?

Please help. Your help would be greatly appreciated.
Mark Fitzpatrick - 21 Sep 2007 19:01 GMT
It doesn't. The confirmation should basically abort the whole process if the
user doesn't confirm. This will mean that the only way to actually get to
the postback stage is to return a true condition from the confirm. Otherwise
the postback won't occur and the code just won't get executed so there's no
need for you to try to get the values.

Signature

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

> Hi,
>
[quoted text clipped - 14 lines]
>
> Please help. Your help would be greatly appreciated.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.