Results 1 to 2 of 2

Thread: How to handle this reset??

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602

    How to handle this reset??

    I have a page that is divide into three parts

    1)

    5 textboxes and a search and reset button

    2) A datagrid which is filled when the user enter some criterias in any of the textboxes and click search


    3)Another datagrid which is independent of 1) and 2)

    My problem is: The user has entered a few values in the searchboxes and clicked search, the datagrid in 2) is filled and has a viewstate. But how should I code the reset button? I want to remove the viewstate of 1) and 2) and restore them to the original values (like when the page is loaded)

    I would hate to do it like in asp with text1.text = "" etc etc Isn't there any way to just remove viewstate for the controls upon reset?

    if I had 2 forms it would be easy, but since 3) is separate from 1) and 2) it is a bit harder...


    Any help?

    kind regards
    Henrik

  2. #2
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    Public Sub bn3_Click(sender as object, e as eventargs) Handles bn3.Click
    Response.Redirect(Request.ServerVariables("HTTPQUERYSTRING"))
    End Sub


    I might be wrong about the HTTPQUERYSTRING part, but the help for the ServerVariables should help you in that respect.
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width