ASP.NET/DHTML

  • Thread starter Thread starter David
  • Start date Start date
D

David

All or Anyone:

I am developing an Internet application where pictures are dragged and
dropped into place. I am doing the drag and drop on the client side with
javascript(unless anyone can suggest a better approach). When the picture
(or actually diagram) is finished I want to store information on the server.
This information is used both to reproduce the diagram on the client and to
provide info for C# code running on the server. I've tried writing the HTML
into a ViewState and reading it at the server but this results in a Security
Warning and an Exception.

Is there an easy way to remember dynamically generated HTML in ASP.NET?

Thanks in advance.
 
David,

The reason you get a security exception is because the viewstate is
encrypted (I believe), and when you write information to it without
encrypting it with the proper key, it realizes that the state has been
tampered with.

What you need to do is create a hidden input field, and then set the
contents of that with your data that you wish to save. You can then read
that on the server side and save it where you need to.

Hope this helps.
 
Back
Top