Showing posts with label release. Show all posts
Showing posts with label release. Show all posts

Monday, March 26, 2012

ASP.NET AJAX 1.0 Beta Documentation problem

I just transfered my code to new AJAX release. There is a lot of problem with documentation of this version. We need it more to be able to use this version of AJAX library.

Some of problems: In the previous version I can get hmtl select control currently selected value easily but no it is a problem...

lstboxUsers = new Sys.UI.Select($get('lstboxUsersId'))

lstboxUsers.get_selectedValue();

Is there any way to do this in new version, I solve much harder problems but this one stay ansolved :).

Regards,

Shegi

Note that the select control is in the Preview bits now and was renamed to 'Selector' in order to make it work for xml-script in Safari. The following should work for you:

var lstboxUsers = new Sys.Preview.UI.Selector($get('lstboxUsersId'));

var selection = lstboxUsers.get_selectedValue();


Thanks Chenriks, can you tell me one more thing?

In previous version of AJAX library it was possible to add click handler on selector control (code is below). What is the syntax in new version of AJAX? Do you have access to some kind of documentation for this?

lstboxUsers.selectionChanged.add(UserOnSelectionClick);

// List Box changes

function UserOnSelectionClick(sender, args)

{

}

Regards,

Shegi


it's:

lstboxUsers.add_selectionChanged(UserOnSelectionClick);

I hope it helps

AW

Saturday, March 24, 2012

ASP.NET 2.0 Wizard in Update Panel BUG

Hi all,

I have a Wizard control within an Update Panel. This used to work fine in Atlas but now that I upgraded to the ASP.NET Ajax release, I've discovered a bug.

When you go through the wizard, clicking the next button to go from step 1 to step 2 works fine. When you click the next button to go from step 2 to step 3, nothing happens and there is a javascript error -'null' is null or not an object. This same bug occurs under the same scenario in a MultiView, even if the next buttons are outside of the MultiView.

This seems to have something to do with ajax choking on the ASP.NET client-side validation, as you can set CausesValidation="false" on the next buttons and then you can go on to step 3. However, this isn't much of a solution, as I want to have client-side validation and not just the Page.Validate() / if(Page.IsValid) server-side code.

Anyone know a way around this bug or if it is being fixed in an upcoming release?

Thanks,

Justin

It appears it had nothing to do with the wizard and everything to do with the asp.net validator controls not working correctly in the current release of asp.net ajax 1.0.

The answer until they fix this is:

http://blogs.msdn.com/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx

Wednesday, March 21, 2012

ASP .NET AJAX Error in MOSS 2007

After installing the release candidate for ASP .NET AJAX on MOSS 2007 RTM (Windows Server 2003 sp1), I get the following error on a web part page that contains a web part hosting a very simple user control (markup at end of this post):

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Respons.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'Box1"/>
|Welcome Jim Ohearn<s'.

The error happens only once when I either click on the button or enter text in the text box. By the way, the web part page becomes uneditable at this point and the onClick call back on the button doesn't punch text into the text box.

I modified the web.config file for SharePoint using the example web.config file that is downloaded with the ASP .NET AJAX toolkit. HTTP commands that used to be handled by SharePoint are now handled by the System.Web.Extensions DLL. Could this be the source of the problem? I've included what I think are the critical changes I've made to the web.config file at the end of this post.

Here is a related posting:
http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=898318&SiteID=17

Here, the person making the post accuses a component in the SharePoint page of executing the Response.Write().

If anyone has any ideas, I'd really appreciate it.

Thanks.

Jim

User control markup:

<%@dotnet.itags.org. Control Language="C#" %
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True" />
<script runat="server"
public void handleOnClick(object sender, EventArgs e)
{
this.TextBox1.Text = "Button Pressed";
}
</script
<div id="wcContent" style="height:300px;width:400px">
<asp:Panel runat="server" id="wc_Div" style="position: relative; top: 10PX; left: 6PX;" >
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="conditional" runat="server">
<ContentTemplate>
<asp:Button ID="Button1" OnClick="handleOnClick" runat="server" Text="Button" />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
</div
web.config snippet:

<remove verb="*" path="*.asmx"/>
<remove verb="GET,HEAD,POST" path="*" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<add verb="GET,HEAD,POST" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add verb="OPTIONS,PROPFIND,PUT,LOCK,UNLOCK,MOVE,COPY,GETLIB,PROPPATCH,MKCOL,DELETE,(GETSOURCE),(HEADSOURCE),(POSTSOURCE)" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /
Here is where the various statments came from:

AJAX web config <remove verb="*" path="*.asmx"/>
MOSS web config <remove verb="GET,HEAD,POST" path="*" />
AJAX web config <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
AJAX web config <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
MOSS web config <add verb="GET,HEAD,POST" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
MOSS web config <add verb="OPTIONS,PROPFIND,PUT,LOCK,UNLOCK,MOVE,COPY,GETLIB,PROPPATCH,MKCOL,DELETE,(GETSOURCE),(HEADSOURCE),(POSTSOURCE)" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

Don't respond to this thread. It is a duplicate of another started in November of '06.

Here is the URL:

http://forums.asp.net/thread/1468535.aspx

Argh! Tabs disappear

Using the AJAX 1.0 release, I create a page with two tabs on it. The page displays great and a 'refresh' leaves the page untouched. However, if I click the submit button on the page, my two tabs disappear and I get the following javascript error:

Line: 218

Char: 9

Error: 'this.get_element().style' is null or not an object

Code: 0

URL:http://localhost/test/SetPassword.aspx

Any idea what might be causing this?

Thanks.

As I've worked with this, I've found that the error only occurs if the tabs are inside an update panel.


Yes this is a known issue - see this thread for discussion/fix:

http://forums.asp.net/thread/1549317.aspx

Are we going to have a next CTP?

Or the next release will be the 1.0 version?

Another CTP is comingaccording to the last reply on this topic... hopefully just in time for DevConnections :-)