Last post Apr 15, 2011 10:54 AM by Mulozi
Mar 23, 2011 02:50 PM|Mulozi|LINK
I get this message when viewing a page in the web matrix project. It continues "An unhandled exception has occurred. RegisterForEventValidation can only be called during Render().
When I run the project at home it seems to resolve itself and the project runs successfully, but when taking the laptop away to demonstrate the project (which I need to do to find someone interested in helping me with aspects of selling it). the buttons
don't respond and I canot move from one page to another. (Sometimes this can also happen at home).
I think this may be something to do with the fact that the laptop has XP home rather than XP professional, or it may be that the laptop needs to connect to the internet before it can run the project via local host.
Grateful for any help.
Mar 28, 2011 04:59 AM|Wenchao Zeng - MSFT|LINK
What is your WebMatrix version? If it is not the latest one, please download and install the latest one
from WebMatrix 1.0: Small, Simple, Seamless and see if it will solve the issue.
Otherwise maybe disable event validation can solve this kind of issues. Please see
RegisterForEventValidation can only be called during Render().
Hope this helps and thanks.
Mar 29, 2011 02:01 PM|vikvish1|LINK
hope this may help you...
Apr 14, 2011 10:11 AM|Mulozi|LINK
Tried this link, thanks.
They suggested <pages EnableEventValidation = "false"> </pages> in my web.config.
I tried it but the message still shows "Error rendering control". However I do find that my code works Ok when my laptop is connected to the internet. I would not have thought that this should be necessary when the laptop should be running ASP.NET off-line
using itself as a server.
I will persevere and am now going to try the other suggestion I received (load the latest version of web matrix).
Apr 15, 2011 10:54 AM|Mulozi|LINK
Thanks the new web matrix version seems to give me what I want. The message about rendering controls has disappeared now.
When I run the site on my computer here, the computer is in fact connected to the internet. Sometime I would like to test it when I am completely off-line which is what I am likely to be if I demonstrate the project in someone else's workplace. I have yet
to try this.
I need to be able to demonstrate the project to potential clients in their workplaces.
I will test this in a few days.
Meanswhile Thank you