|
 |
asp_discuss thread: SV: Re: is it possible?
Message #1 by Aftab Ahmad <aftab.ahmad@k...> on Thu, 21 Nov 2002 09:27:41 +0100
|
|
Hi
I am not sure is it correct answer what u r looking for.
U can try with submit buttons that have same name (i-e btnSubmit) but
have
different value (like insert, delete,update).
At ur target page collect these form values and execute the particular
part
of code using "if elseif" or "case" statement like:
If Request.Form("btnSubmit") =3D "insert" Then
' code to insert record in database
=09
Elseif Request.Form("btnSubmit") =3D "delete" Then
' code to delete record from database
Elseif Request.Form("btnSubmit") =3D "update" Then
' code to update record from database
End If
Aftab
-----Opprinnelig melding-----
Fra: Rabia Tabassum [mailto:rabi786t@h...]
Sendt: 21. november 2002 08:56
Til: asp_discuss
Emne: [asp_discuss] Re: is it possible?
hi
infact i want to that when i click add button the record should insert
and
at the same page when i click delete it will delete record. one way is
that
i should make each button as submit type and at action in form tag i
should
give path of asp page for add and for delet i should give path of
another
asp page. but i want to handle different buttons with one asp page.
when i
click on add button only inserton record should execute and on clicking
delete button only delete part should execute. becaz the way i m doing
it'll
be too heavy to use=A0as much asp as button. so if i have three buttons
and i
want to execute different codes on clicking event those code which runs
on
server side then i have to make three asp pages.
is there any solution????
rabia
=A0
=A0
=A0
=A0
>From: Imar@S...
>Reply-To: "asp_discuss"
>To: "asp_discuss"
>Subject: [asp_discuss] Re: is it possible?
>Date: Wed, 20 Nov 2002 17:38:31
>
>I am not complete sure what you are trying to accomplish.
>
>If you want to run code on the server after a click on a button at the
>client, you'll need to submit the form to the server and process it
there.
>
>Something like this:
>
>
>' Server side
><%
> If Request.Form("btnSubmit") <> "" Then
> ' Submit button pressed. Do your "add" stuff here
> End If
>%>
>
>
>
>
>
>HtH
>
>Imar
>
>
>
> > =A0 is it possible that i am using vb script at server side and
onclick
>event i want to run a function declared in vbscript. that when i click
>then response .write will execuet but when ever i write in browser it
>always execute before clicking at button. is it possible to do what i
>want that on click a function=A0 who is running at server will be
>execute???????????
>=A0
>=A0
>
>
>=A0
>
>
>
>
>
>
>
>
>
>
>=A0
>=A0
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>Add photos to your e-mail with MSN 8. Get 2 months FREE*.
MSN 8 with e-mail virus protection service: 2 months FREE*
|
|
 |