Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

Wednesday, March 21, 2012

Declarative Script is parsed twice

When you start a new Atlas project, the code says at the end
" <script type="text/xml-script">
<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
<references>
</references>
<components>
</components>
</page>
</script>
"
When you build the page, this piece of code is inserted twice (justlook at the source). Is there a way to prevent that, in other words,can't Atlas build his code in the existing script?
This is just a (little) waste of bandwidth

Hi,

That code is there just as a template to help you get started. The second copy of the script that you probably see is what gets rendered by the ScriptManager control.

You can just remove the static XML-Script tag if you're not planning on using it.

Thanks,

Eilon


I see, but wouldn't it be nice to merge the static XML with the XML rendered by the scriptmanager?

Currently the ScriptManager doesn't even know about the static XML script on the page since it doesn't have a runat="server" on it and there's no control that represents it. We're thinking of ways that we can merge these two concepts, and have some ideas, but nothing to show just yet :)

Thanks,

Eilon

decimal data type

Hi all,

I am having trouble working with the decimal data type in the client side js. I am returning this custom object that has decimal properties. When I try to ready the value of these properties in javascript I get an object type.

How can I get the values?

Decimal should be working well. e.g. I just tested with a simple EchoDecimal method, and it correctly round trips the number I pass in:

[WebMethod]

publicDecimal EchoDecimal(Decimal de) {

return de;

}

What do you mean by "I get an object type"? Have you tried using fiddler to make sure the data over the wire looks proper?

David