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, 11: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, 05: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







Giorgio Parmeggiani
  Reply With Quote
Old 11-01-2003, 05: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




Bernie V
  Reply With Quote
Old 11-01-2003, 09: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




Giorgio Parmeggiani
  Reply With Quote
Old 11-02-2003, 08: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




Bernie V
  Reply With Quote
Old 11-03-2003, 01: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
>




blender@head.gov
  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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Reset / Recover Forgotten Windows NT / 2000 / XP / 2003 Administrator Password wskaihd Software 2 11-17-2009 02:01 AM
Linksys Srw2008p Reset sja Hardware 0 02-03-2009 07:53 PM
Values set by javascript are not reflected in serverside(.Net) rchimakurty Software 2 11-28-2007 10:07 AM
Checkbox values problem in gridview thanigaimani.thirumalai Software 0 11-09-2007 05:12 AM
Beeping during boot, reset to boot correctly Richard A+ Certification 1 08-15-2003 03:39 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46