ASP.NET Javascript value modification problem 2
February 20th, 2006 // 4:04 pm @ Amar
continued from my previous post …
I guessed as .NET viewstate is managed mostly using Javascript and GET / POST, there should be some way by which I can signify my hidden variables as dirty or refresh the viewstate to reflect the value changes by Javascript, before it is sent to the backend when the Send Message button is clicked. But no avail. I could not find any way to refresh or resync the viewstate using Javascript. I guess that should be because Viewstate is managed on the server so maybe we cannot modify it from the client and ask the server to resync with it.
So second approach, was to try to somehow add the values to a post queue. As new updated values will be send using a standard POST and ASP.NET will sync and update the ViewState internally. So that instead of accessing using ViewState, I can maybe access the updated Javascript values from the backend page using the old Request.Form method. But no avail. Still did not work.
Another idea was to create dynamic textboxes thru Javascripts, when the SendMail button is clicked and fill it with the value and then access them using Request.Form from the backend. But still the new values were not reflected.
Posted at DotNetJunkies on Tuesday, November 09, 2004 1:20 PM
Category : dotNet