View data loaded by loading LoadPostData in ASP.NET
Ugh ... I would suggest setting up the IDE to debug the .net framework and set a breakpoint on the LoadPostData () control method. It's a little cumbersome, but if you're willing to go through recursive calls to the Control class (perhaps set a conditional breakpoint on a method?), You can get to the data that way.
Good luck!
source to share
If you want to be sure to look at the data going into a specific control, you can subclass its control type and break it down during custom implementation IPostBackDataHandler.LoadPostData
.
For example, you have a programmatically added control to collect the user's city. Change:
Public City As Textbox
to
Public City As BreakableLoadPostDataTextBox
Public Class BreakableLoadPostDataTextBox
Inherits TextBox
Protected Overrides Function LoadPostData( _
ByVal postDataKey As String, _
ByVal postCollection As System.Collections.Specialized.NameValueCollection) _
As Boolean
Return MyBase.LoadPostData(postDataKey, postCollection) ' Break here
End Function
End Class
Set a breakpoint on the call Return
. When interrupts are executed, you should be able to see postDataKey
which one is being used to read the new control value from postCollection
. You can of course expand this method to your heart with Trace calls and whatnot.
source to share