Display Confirmation MessageBox, but only if conditions met

  • Thread starter Thread starter bay_dar
  • Start date Start date
B

bay_dar

I have an ASP.NET application with VB that I would like to use a
confirmation box with, but only if certain conditions are met. In my
case I would only want this msgbox to show up if a user entered a start
and end range in a form, where the difference between the ranges is
greater then 10. However, only the start point is required, so no
confirmation box is required if the ending point is not entered.

I downloaded a nice confirmation control from here:
http://www.timstall.com/Code/ConfirmButton.aspx

However, it is an all or nothing approach, the confirmation button
always shows up when the form button is submitted. Any ideas on how my
situation could be handled?

Thanks,

Bay
 
I have an ASP.NET application

Then I recommend reposting your question in one of the
microsoft.public.dotnet.framework.aspnet.* newsgroups, as this has
nothing to do with Windows Forms.

If you're familiar with JavaScript, you can do what you want on the
client with the confirm() function.


Mattias
 
Then I recommend reposting your question in one of the
microsoft.public.dotnet.framework.aspnet.* newsgroups, as this has
nothing to do with Windows Forms.

If you're familiar with JavaScript, you can do what you want on the
client with the confirm() function.


Mattias

In addition to Mattias has said, most users will send bounty hunters after a
programmer or GUI designer who uses confirmation messages for common tasks. They
should only be used for errors and the like. That's just my opinion. I could
be wrong.
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
 
Otis said:
In addition to Mattias has said, most users will send bounty hunters after a
programmer or GUI designer who uses confirmation messages for common tasks. They
should only be used for errors and the like. That's just my opinion. I could
be wrong.
Good luck with your project,


This is an internal application for my org, and this will be the only
confirmation box in the app. We want this one step to be confirmed,
because if they put a large value in the range, many could be affected,
so we want to verify it is not a mistake.

I have found that I can do what I want with a confirmation box using
something like the following in the Page_load.

btn_send_event.Attributes.Add("onclick", "javascript: return
RangeOK();")

If the RangeOK() function returns false, I don't send the event. If the
function returns nothing the send_event is processed.

I put my confirm box in the RangeOK() function.

Bay.
 
Back
Top