ラベル specific の投稿を表示しています。 すべての投稿を表示
ラベル specific の投稿を表示しています。 すべての投稿を表示

2012年3月26日月曜日

Restricting start date on Calendar extender.

How can I restrict the calendar so the user can not select a past date or dates prior to a specific date? And similarly for future date. Or do I need to validate it on

OnClientDateSelectionChanged

Thanks.

Yes, you would need to do some validation. One method you can use though is toremove the arrows that let the user cycle through the months based on a certain month/year combination.

returing a datatable

I'm having a problem trying to get a datatable from a CodeBehind using Pagemethods with ASP.NET Ajax Rc that was just released. The specific error is below. This code worked with the July CTP. If you have any suggestions, let me know.

System.InvalidOperationException A Circular reference was detedted while serializing an object of type System.Reflection.Module

Returning a datatable - solution

1) add reference ASP.NET 2.0 AJAX Futures December CTP DLL to solution,

2) add the following section to web. config

<

scripting>

<

webServices>

<

jsonSerialization>

<

converters>

<

addname="DataSetConverter"type="Microsoft.Web.Preview.Script.Serialization.Converters.DataSetConverter, Microsoft.Web.Preview"/>

<

addname="DataRowConverter"type="Microsoft.Web.Preview.Script.Serialization.Converters.DataRowConverter, Microsoft.Web.Preview"/>

<

addname="DataTableConverter"type="Microsoft.Web.Preview.Script.Serialization.Converters.DataTableConverter, Microsoft.Web.Preview"/>

</

converters>

</

jsonSerialization>

</

webServices>

</scripting>

3) Add ASP.NET 2.0 AJAX Futures December CTP 'PreviewScript.js' to ur solution

4) Add the Script reference ur aspx page

<asp:ScriptManagerID="ScriptManager1"runat="server"><Scripts><asp:ScriptReferencePath="PreviewScript.js"/></Scripts></asp:ScriptManager>

5) we need to change the PageMethod(in code behind page that returns DataTable) toStatic

6)in order to get the result this way( result.getItem(i).getProperty("Column name");) we need to parse

Sys.Preview.Data.DataTable.parseFromJson(result);


This doesn't work anymore in v1.0. Anyone know how to fix it?

jsonSerialization>

<

converters>

<

addname="DataSetConverter"type="Microsoft.Web.Preview.Script.Serialization.Converters.DataSetConverter, Microsoft.Web.Preview"/>

<

addname="DataRowConverter"type="Microsoft.Web.Preview.Script.Serialization.Converters.DataRowConverter, Microsoft.Web.Preview"/>

<

addname="DataTableConverter"type="Microsoft.Web.Preview.Script.Serialization.Converters.DataTableConverter, Microsoft.Web.Preview"/>

</

converters>

</

jsonSerialization>


This does work, I just forgot to download the January Futures CTP.