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

Re: Display Confirmation MessageBox, but only if conditions met by Mattias

Mattias
Thu Oct 26 13:40:43 CDT 2006


>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

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Re: Display Confirmation MessageBox, but only if conditions met by Otis

Otis
Fri Oct 27 06:48:55 CDT 2006

On Thu, 26 Oct 2006 20:40:43 +0200, Mattias Sjögren
<mattias.dont.want.spam@mvps.org> wrote:

>
>>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

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

Re: Display Confirmation MessageBox, but only if conditions met by bay_dar

bay_dar
Fri Oct 27 07:16:16 CDT 2006


Otis Mukinfus wrote:

> 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.