I'm having a very strange problem with our ASP.NET application. It is losing the value of a HiddenField on the pages that I had programmed. I will explain the situation in a simple way:

  1. I have a page that has 4 Buttons and 1 HiddenField.
  2. 3 of this buttons modify the value on the HiddenField.
  3. The fourth button reads the value of the HiddenField, something like this:
    Select Case hf_PageState.Value
            Case "new"
                'Validate data only on new
            Case "modify", "delete"
                'Validate data only on modify or delete
            Case Else
                'Critic error
                Throw New Exception("HiddenField Value lost")
        End Select

This button is only available after using any of the 3 buttons mentioned before.

  1. In very very strange cases, when the user uses the fourth button, the application fires the "HiddenField Value lost", but I don't know why, because after a lot of test I can't reproduce the problem. This problem has ocurred approximately every 3 months.

┬┐There is a way a HiddenField can lost their values assigned for any reason? This weird problem happened now on 2 pages with distinct logic function.

Related posts

Recent Viewed