|
-
Sep 20th, 2002, 03:44 AM
#1
Thread Starter
Hyperactive Member
Clear the Form control values
hi
I have created a form with 5 textboxes and Two Buttons like Save and Cancel.
When i Click the Save Button it refers to the Save routine in Server side like
<script runat=server>
Sub SaveClk(................)
..........
............
End Sub
</script>
now the problem is i need to Clear the all Textbox values after finish my Save Routine. If i have RESET button i can use that. But i need to clear after my save routine finished..
Any idea?
-
Sep 20th, 2002, 09:20 PM
#2
Addicted Member
What I would do is create a function that does all the clearing and then call that after you are done with the Save. You can just call the same routine for the clear button too.
-
Sep 21st, 2002, 01:41 AM
#3
Thread Starter
Hyperactive Member
Your idea is good but if i have 50 textboxes in my form How will u write the code. Will you write like as follow.?
textbox1.value=""
textbox2.value=""
.....
...
....
...
textbox50.value=""
any idea.?
-
Sep 24th, 2002, 04:31 PM
#4
Member
You could just do a Response.Redirect back to the page, that should clear the values of the textboxes.
-
Sep 25th, 2002, 06:41 AM
#5
Thread Starter
Hyperactive Member
can't we Use for Each Statement Like VB.?
-
Sep 25th, 2002, 07:28 AM
#6
Hyperactive Member
Hi buddu!
You may turn off the View state feature, so that all your controls are cleared automatically like traditional ASP.
I hope its something like this, and it should be at the page level.
<% EnableViewstate=false %>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|