Hidden Values

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hi,

Is there a way to hold values on an ASP.NET page but not make them
visible?
I want to use them only in my runtime code.

Thanks,
Miguel
 
Sometimes you may want to hide controls with css style display:none. This is
useful when you need the values on client side.

But search-engines don't like that approach...
 
Ysgrifennodd shapper:
Hi,

Is there a way to hold values on an ASP.NET page but not make them
visible?
I want to use them only in my runtime code.

Thanks,
Miguel

There are many ways of persisting data within an ASP.NET application.
The method you decide upon will vary depending on your requirements.
For example, whether you want to just hold values for redisplaying, hold
values to make them available between pages, hold values for possible
later saving to a persistent store etc etc.

Someone has already mentioned ViewState. You may also want to look at
Session state and maybe even Application state.

We find that the data in nearly all of our applications represents, or
models, some physical entity, or entities, in the real world - for
example an Application Form, a course enrolment or a network identity,
to name but three. For this reason, we usually find it convenient to
create a server-side (Web server) object to represent this entity. As
users work their way through the applications, data is stored in these
objects and a reference to the object is stored in the Session, meaning
that all the data currently associated with the object can be retrieved
at any place in the UI layer of our application.

But YMMV. What applies to us may not apply to you.

HTH


Peter
 
Back
Top