Re: Setting HiddenField .Value
- From: Peter Bromberg [C# MVP] <pbromberg@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 4 May 2007 05:56:01 -0700
Session data is server-side; javascript normally implies "client side" (in
the browser). You can marshal any server-side data to the client as long as
it can be converted to a string representation or JSON encoding, and make it
available in the browser to use via script.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Efi Merdler" wrote:
Can Session data written by asp.net be read by javascript ?.
Peter wrote:
store it in Session (user-specific) or Cache (application specific) or even
Application state.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Efi Merdler" wrote:
Thanks.
Maybe you can help me solve my problem, in order to decrease the
number of times a user has to fetch data from the server, I'm saving
data in an hidden field, so when the user decides to display the new
data I'm using javascript to display it.
Do you have another idea how can I implement such a behavior ?
Thank you,
Efi
Peter wrote:
That's because the Xml control is specifically designed to render (as HTML)
the result of an XSLT Transform on an XmlDocument. You were talking about a
hidden form field. Two different animals.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Efi Merdler" wrote:
Kevin Spencer כתב:
You can't. The '<' and '>' characters are not legal values in a form field,
or anywhere else in an HTML document except as element brackets. That is why
they are HtmlEncoded when you put the string into the Hidden form field.
--
HTH,
Kevin Spencer
Microsoft MVP
Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
"Efi Merdler" <fooshm@xxxxxxxxx> wrote in message
news:1178203524.238623.217410@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
In my code I'm doing some xml transformation, at the end I receive a
fully transformed html file.
I'm setting the Value property of an hidden field control to have the
content of this html file.
In the debugger I can see that the control contains the value
correctly, however when the page is displayed in a browser all <
symbols are replaced by < .
How can I change this behavior.
Thanks,
Efi
Thanks to both of you,
The Xml control does manage to output my xml as correct html, so why
it can and I can't (I sound like a little boy :-) )
- References:
- Setting HiddenField .Value
- From: Efi Merdler
- Re: Setting HiddenField .Value
- From: Kevin Spencer
- Re: Setting HiddenField .Value
- From: Efi Merdler
- Re: Setting HiddenField .Value
- From: Efi Merdler
- Re: Setting HiddenField .Value
- From: Peter Bromberg [C# MVP]
- Re: Setting HiddenField .Value
- From: Efi Merdler
- Setting HiddenField .Value
- Prev by Date: Re: Adding several records at once
- Next by Date: RE: Updating a Web-Site
- Previous by thread: Re: Setting HiddenField .Value
- Next by thread: Setup Under Maintenance page for asp.net website
- Index(es):
Relevant Pages
|