Maybe a static method and/or View State?

  • Thread starter Thread starter CK
  • Start date Start date
C

CK

Hi All,

I am making a filter for a web page datagrid. I have the inner workings of
the filter doing what I need it to do. What I am trying to accomplish now is
to somehow retain the state of the filter between postbacks. I have two
images of a filter icon button. One is pressed and the other de-pressed. If
the filter is active, I would like some method to return true? otherwise
false. Then bind the image src to that property somehow. Does that make
sense? When the user clicks the image, I would set the IsFilter, then
postback, then evaluate IsFilter, then set the image source to the proper
image. Any ideas on how to approach this? All feedback is appreciated.

Thanks In Advance,
~CK
 
Hello CK,

Why not to use Cookie? it's a good way to keep user's filter settings not
only between postback but between pages too

C> I am making a filter for a web page datagrid. I have the inner
C> workings of the filter doing what I need it to do. What I am trying
C> to accomplish now is to somehow retain the state of the filter
C> between postbacks. I have two images of a filter icon button. One is
C> pressed and the other de-pressed. If the filter is active, I would
C> like some method to return true? otherwise false. Then bind the image
C> src to that property somehow. Does that make sense? When the user
C> clicks the image, I would set the IsFilter, then postback, then
C> evaluate IsFilter, then set the image source to the proper image. Any
C> ideas on how to approach this? All feedback is appreciated.

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 
Back
Top