A
Aamir Ghanchi
Hi,
I hope there is a solution for this other than lowering guard by
turning off ValidateRequest property of the page (or in webconfig)
On page load I move xml string value into an Xml web control's
DocumentContent property (not the XmlDataSource) and enableviewstate
to true. When the page posts back, I get the error as follows:
"A potentially dangerous Request.Form value was detected from the
client ..."
It's obviously freaking out on the angled brackets in the content.
Being an asp control I thought it should be given a special treatment
by asp through some internal encodeing etc. I tried HtmlEncode, but it
will throw some other xml exception of being not well formed or
msissing root. Any way I gave up and am using a HiddenField instead to
hold the value between the trips, but it would be nice to use xml
control to hold xml data.
Any ideas?
TIA
I hope there is a solution for this other than lowering guard by
turning off ValidateRequest property of the page (or in webconfig)
On page load I move xml string value into an Xml web control's
DocumentContent property (not the XmlDataSource) and enableviewstate
to true. When the page posts back, I get the error as follows:
"A potentially dangerous Request.Form value was detected from the
client ..."
It's obviously freaking out on the angled brackets in the content.
Being an asp control I thought it should be given a special treatment
by asp through some internal encodeing etc. I tried HtmlEncode, but it
will throw some other xml exception of being not well formed or
msissing root. Any way I gave up and am using a HiddenField instead to
hold the value between the trips, but it would be nice to use xml
control to hold xml data.
Any ideas?
TIA