confirmation and passing values

confirmation and passing values

am 14.01.2008 00:30:37 von rsht

I am new to the ASP.Net and need some helps.

In ASP, page one can have a button event "confirm()" to pop-up a yes
or no window:


....


and if user click yes to onfirm, the function can have form.submit to
post the form values to page2

Now I am having trouble to write aspx pages to do the same. Would
anyone can give some helps?

Thanks a lots!

RE: confirmation and passing values

am 14.01.2008 00:51:00 von mily242



Regards
--
Milosz


"rsht" wrote:

> I am new to the ASP.Net and need some helps.
>
> In ASP, page one can have a button event "confirm()" to pop-up a yes
> or no window:
>


> ....
>
>

> and if user click yes to onfirm, the function can have form.submit to
> post the form values to page2
>
> Now I am having trouble to write aspx pages to do the same. Would
> anyone can give some helps?
>
> Thanks a lots!
>
>

Re: confirmation and passing values

am 14.01.2008 01:59:16 von rsht

Thanks Milosz!

Could you tell me how I can act differently base on which button user
clicks when responds to the "question...?"? Basically, this is a
confirmation for the database update with the current webform input.
If user click OK, the action should update the database with the user
inputs in the controls within the webform.


On Jan 14, 10:51=A0am, Milosz Skalecki [MCAD]
wrote:
> > confirm('question...?')"/>
>
> Regards
> --
> Milosz
>
>
>
> "rsht" wrote:
> > I am new to the ASP.Net and need some helps.
>
> > In ASP, page one can have a button event "confirm()" to pop-up a yes
> > or no window:
> >


> > ....
> >
> >

> > and if user click yes to onfirm, the function can have form.submit to
> > post the form values to page2
>
> > Now I am having trouble to write aspx pages to do the same. Would
> > anyone can give some helps?
>
> > Thanks a lots!- Hide quoted text -
>
> - Show quoted text -

Re: confirmation and passing values

am 14.01.2008 02:56:02 von mily242

The code i posted prevents the form from being posted if users click 'cancel'
button (nothing will happen). Amending the code to post the value to the
server, and then you may decide what to do:





-- c# code behinnd --
protected void btn_Click(object sender, EventArgs e)
{
bool confirmed = Convert.ToBoolean(hdn.Value);

if (confirmed)
{
// do something
}
else
{
// do something else
}

}
-- end c# code behind --

Hope this helps
--
Milosz


"rsht" wrote:

> Thanks Milosz!
>
> Could you tell me how I can act differently base on which button user
> clicks when responds to the "question...?"? Basically, this is a
> confirmation for the database update with the current webform input.
> If user click OK, the action should update the database with the user
> inputs in the controls within the webform.
>
>
> On Jan 14, 10:51 am, Milosz Skalecki [MCAD]
> wrote:
> >
> >
> > Regards
> > --
> > Milosz
> >
> >
> >
> > "rsht" wrote:
> > > I am new to the ASP.Net and need some helps.
> >
> > > In ASP, page one can have a button event "confirm()" to pop-up a yes
> > > or no window:
> > >


> > > ....
> > >
> > >

> > > and if user click yes to onfirm, the function can have form.submit to
> > > post the form values to page2
> >
> > > Now I am having trouble to write aspx pages to do the same. Would
> > > anyone can give some helps?
> >
> > > Thanks a lots!- Hide quoted text -
> >
> > - Show quoted text -
>
>