468,251 Members | 1,378 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,251 developers. It's quick & easy.

Weird ViewState problem with NonSerialized() and Guid field

Hi,

I have an object getting saved into ViewState.
The first (private) field of the object class is of type System.Guid.

Upon postback, after clicking an ImageButton in my page, I get an exception
of type "An error has occurred because a control with auto- generated id..."
etc.

I actually generate myself the ID mentionned in the exception and the code
should work fine since I'm not doing anything at all in Page_Load upon
postback.

If I replace the field with a string and change my code so that I convert my
string into a guid first when using it, I don't get the error.

I checked my code multiple times, and I really don't know what I'm doing
wrong.
Nov 19 '05 #1
0 874

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Makarand | last post: by
2 posts views Thread by Perecli Manole | last post: by
2 posts views Thread by Janaka | last post: by
6 posts views Thread by clsmith66 | last post: by
5 posts views Thread by Steve Richter | last post: by
10 posts views Thread by Steve Richter | last post: by
10 posts views Thread by Robert | last post: by
6 posts views Thread by hitendra15 | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.