I have a page that is based on a master page, the page has a few UpdatePanel controls and things works fine.
Problem starts when I try to update a hiddenfield control from my code behind like this –
**Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
scrollerHiddenField1.Value = getLatest10()
End Sub
Private Function getLatest10() As String
Dim db As New DataClassesDataContext
Dim r = From p In db.LATEST10s
Select p.carId
Dim retString As String = ""
For Each c As String In r
Dim fnumber As String = Mid(c, 1, 2) & "-" & Mid(c, 3, 3) & "-" & Mid(c, 6, 2)
retString &= fnumber & ","
Next
Return retString
End Function**
if getLatest10 function returns a string that has html tags inside and then I click a button I am getting the following error-
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error
occurred while processing the request on the server. The status code
returned from the server was: 500
if getLatest10 function returns a string that has NO html tags inside things works fine.
Any Idea of how to solve this?
I’m not sure but please check if you are doing this in the right state of the page life cycle:
http://msdn.microsoft.com/en-us/library/ms178472.aspx