471,315 Members | 1,461 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,315 software developers and data experts.

ASP.NET/DHTML

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.
Dec 12 '05 #1
1 1017
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"David" <Co*********@AdsorptionProcessModeling.com> wrote in message
news:P4mnf.66235$_k3.25994@dukeread01...
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.

Dec 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Frances Del Rio | last post: by
2 posts views Thread by | last post: by
1 post views Thread by Bob T | last post: by
17 posts views Thread by Jacques Jamain | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.