开发者

How to share a web page (asp.net) with others

Here is what I'm trying to do :

The user accesses a web page (asp.net web application), ma开发者_如何学Ckes his selections and applies filters to render the screen. Now I'm looking for a way to share this view with somebody else who also has access to the application.

Although in a simple scenario this can achieved through query strings and sharing the URL, how can this be achieved in a more complicated scenario where a bunch of selections / filters are applied to render a view ?

To start with, I implemented a basic framework. A datastructure will hold key value pairs which represents the controls and the values associated with it. I persist this to a database and the page will be responsible to parse the key-value collection and render itself but I think this may not be practical when there are complex controls like a grid with features such as grouping, filtering etc.

Most importantly, it would be great if the solution does'nt force the aspx to be implemented in a certain way for them to be persisted.

Any suggestions.

Thanks


You can use static variables. What is static, that is shared.

Simply said: Static variabels belong to the application. All open windows belong to the same application and this should work with the standard settings.

Note that on big web servers IIS can be setup to run multiple instances of the same application. In that case static variables aren't shared so simply. But I think this is a special case and you can omit it.


Just brainstorming but here goes... Since you are storing the controls and their data (basically a customized viewstate) in key-value pairs, and storing that information in the database, associate a key on that state information. Then just append that key to the query string and when a user comes to that page look up that key in your data base and load the controls with the data that was saved for them, for that key and ... profit?

so your link would look like: http://www.mysite.com/mypage?id=SomeKey

Without knowing the true intent and the complexity involved this might seem overly simplistic, and apologize if i missed the mark on this completely.


If you are using a 3rd party Grid control, they probably store this filter state in a cookie. You might be able to plug into this system to persist the state for the grid as a special case. Something like 1) store data from grid's response cookie in database 2) retrieve cookie info from database, add it to response cookie collection.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜