开发者

managing unique key for cache?

I have to use cache multiple forms data that will be submitted on last form. I m not getting how to handle cache开发者_高级运维 key as it should be unique. I want to use this key to get and put data in different forms. I considered to use GUID but it is very long to put in query string.

Please guide me on this.

thanks


Session has its downsides, for example it's cookie dependent. Using the Cache is possible but you must handle it carefully as it's shared by all users.

To answer your question, use GUID and pass it as hidden field in all the forms, as they're using POST method you won't see this GUID on the query string.


If you need to preserve user data between requests, consider using ASP.NET Session State. Your user's browser is tied to the session through a cookie, which deals with your issue of having an ugly value in your query string.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜