Hidden Values

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
 
T

Tim Van Wassenhove

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...
 
P

Peter Bradley

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top