Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - reset values on a webform

 
Thread Tools Search this Thread
Old 11-01-2003, 10:47 AM   #1
Default reset values on a webform


Hi group,

I have a waebform to send emails.
On the form there are 2 buttons: A button "send" and a button "reset".

If I click aon the button my email is send, but I want to reset the values
on my form (to send another email).

How can I do that. ?

thx in advance !

gr

Bernie V




Bernie V
  Reply With Quote
Old 11-01-2003, 04:07 PM   #2
Giorgio Parmeggiani
 
Posts: n/a
Default Re: reset values on a webform

Hi

> If I click aon the button my email is send, but I want to reset the values
> on my form (to send another email).


You can use a ResetButton:
<INPUT type="reset" value="Reset">

Hi
Giorgio





  Reply With Quote
Old 11-01-2003, 04:25 PM   #3
Bernie V
 
Posts: n/a
Default Re: reset values on a webform


"Giorgio Parmeggiani" <> schreef in bericht
news:...
> Hi
>
> > If I click aon the button my email is send, but I want to reset the

values
> > on my form (to send another email).

>
> You can use a ResetButton:
> <INPUT type="reset" value="Reset">
>
> Hi
> Giorgio
>


thx for the tip, bit is it also possible with code in stead of a button ?

thx in advance,

gr

Bernie V


  Reply With Quote
Old 11-01-2003, 08:54 PM   #4
Giorgio Parmeggiani
 
Posts: n/a
Default Re: reset values on a webform

Hi Bernie

> > You can use a ResetButton:
> > <INPUT type="reset" value="Reset">
> >

> thx for the tip, bit is it also possible with code in stead of a button ?
>


Yes you can reset your form using Javascript client code, here an example:

in the HTML page
<script language=javascript>
function reset()
{
document.forms[0].email.value="";
..........
document.forms[0].cc = "";
}
</script>

in the codebehind(at example in the Page_Load event):

this.Button1.Attributes.Add("OnClick", "java" + "script:Reset();");

Giorgio


  Reply With Quote
Old 11-02-2003, 07:15 AM   #5
Bernie V
 
Posts: n/a
Default Re: reset values on a webform


"Giorgio Parmeggiani" <> schreef in bericht
news:...
> Hi Bernie
>
> > > You can use a ResetButton:
> > > <INPUT type="reset" value="Reset">
> > >

> > thx for the tip, bit is it also possible with code in stead of a button

?
> >

>
> Yes you can reset your form using Javascript client code, here an example:
>
> in the HTML page
> <script language=javascript>
> function reset()
> {
> document.forms[0].email.value="";
> ..........
> document.forms[0].cc = "";
> }
> </script>
>
> in the codebehind(at example in the Page_Load event):
>
> this.Button1.Attributes.Add("OnClick", "java" + "script:Reset();");
>
> Giorgio
>
>


thx a lot !!
Bernie V


  Reply With Quote
Old 11-03-2003, 12:53 AM   #6
blender@head.gov
 
Posts: n/a
Default Re: reset values on a webform

Another way to do it is:

document.forms[0].reset();




On Sat, 1 Nov 2003 22:54:27 +0100, "Giorgio Parmeggiani"
<> wrotC:
>Hi Bernie
>
>> > You can use a ResetButton:
>> > <INPUT type="reset" value="Reset">
>> >

>> thx for the tip, bit is it also possible with code in stead of a button ?
>>

>
>Yes you can reset your form using Javascript client code, here an example:
>
>in the HTML page
><script language=javascript>
> function reset()
> {
> document.forms[0].email.value="";
> ..........
> document.forms[0].cc = "";
> }
></script>
>
>in the codebehind(at example in the Page_Load event):
>
>this.Button1.Attributes.Add("OnClick", "java" + "script:Reset();");
>
>Giorgio
>


  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump