I have watched the msdn video "How Do I: Create a Visual Studio 2005 ASP.NET
AJAX Application to Work with Windows Mobile Devices?" (located on this site
http://msdn.microsoft.com/en-us/netframework/bb931341.aspx ) and I've tested the
same example on windows mobile 6 professional emulator using Visual studio 2008 and ActiveSync 4.5.The problem is when I download the website from internet explorer
mobile ,the site is downloaded on the device but with Javascript errors .Besides,when I select a value from the dropdown list or when I click on the button,it seems that the device doesn't recognize AJAX or javascript because
the result will be displayed successfully but with a page refresh.I've tested the same example
on localhost and it worked perfectly.
I have both Visual studio 2005 and Visual studio 2008 installed on my PC
.Besides,when I was installing Windows mobile 6 professional SDK I was
alerted that " .Net Compact framework 2.0 SP1" and "Visual studio 2005 SP1
or later" are not installed on my PC.
Could you have any explanations to my case? Thank you in advance.
The following is the code website:
Default.aspx
<%
@ Page
Language="C#"
AutoEventWireup="true"
CodeFile="Default.aspx.cs"
Inherits="_Default" %>
<!DOCTYPE
html PUBLIC
"-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
I don’t know what you mean by debugging on IE mobile…In fact I’m a beginner..But I want to inform you that I’ve too simply followed the steps mentioned in
the video.Therefore,I’ve first tested my website on the localhost by debugging it.After I’ve noticed that it worked fine specially about AJAX,I’ve stopped the debugging .Then I’ve launched the device emulator manager ,then I’ve done « connect to windows mobile
6 professional emulator » then I’ve done « cradle ».Finally I’ve launched the internet explorer mobile browser on the emulator and I’ve tested the website on it by entering the website’s URL.
I've set the Compilation debug to false in the web.config file. Indeed I've checked that the script mode of the script manager is set to release ,the render mode of the update panel is set to inline and the use submit behavior for the button is set to false.When
I 've tested my website on IE Mobile ,it didn't show me errors but when I select an item from the dropdown list or when I click on the button,the result will be displayed with a page refresh .I don't know the reason for that...Is there any other setting to
do???
I have uploaded the above mentioned sample with some modifications to my server:
http://ttklf4.tempw8.internet1.de/m/t/Default1.aspx. This sample uses the browser definition for IEMobile and not the ClientTarget. Therefore I have left out the following code:
Because ASP.NET AJAX .NET has changed from .NET Framework 2.0 to version 3.5 SP1 there may be some issues with Internet Explorer mobile and I will check them.
I rechecked my website again and I have tried to test it with and without the browser definition for IE mobile.However,AJAX still doesn't work.Besides I've tried also to test the sample located on this link (http://msdn.microsoft.com/en-us/netframework/bb879961.aspx) .On
the button click,the sentence "Searching images for cat" has returned without a page refresh but the rest (the images..)was not returned.Therefore,it appears that the web service was not invoked....
Anyway,if you find something new about my case can you notify me please?
Currently I don't know why ASP.NET AJAX of the.NET Framework 3.5/3.5 SP1 no more works on IE Mobile.
The Ajax calls are send but the UpdatePanel is not updated. Only the second call causes an update. From the third call on I get the following error message if I click a button:
Line 5 Character:9340
Error: '__EVENTTARGET is null or not an object
Source:(null)
Thank you a lot for this information eventhough I am like you ,wondering the reason for that issue with asp.net 3.5 .Wish it will be fixed in the future!
Sam.m
0 Points
16 Posts
Internet Explorer mobile seems doesn't recognize AJAX
Nov 03, 2008 11:05 AM|LINK
AJAX Application to Work with Windows Mobile Devices?" (located on this site http://msdn.microsoft.com/en-us/netframework/bb931341.aspx ) and I've tested the same example on windows mobile 6 professional emulator using Visual studio 2008 and ActiveSync 4.5.The problem is when I download the website from internet explorer
mobile ,the site is downloaded on the device but with Javascript errors .Besides,when I select a value from the dropdown list or when I click on the button,it seems that the device doesn't recognize AJAX or javascript because
the result will be displayed successfully but with a page refresh.I've tested the same example
on localhost and it worked perfectly.
I have both Visual studio 2005 and Visual studio 2008 installed on my PC
.Besides,when I was installing Windows mobile 6 professional SDK I was
alerted that " .Net Compact framework 2.0 SP1" and "Visual studio 2005 SP1
or later" are not installed on my PC.
Could you have any explanations to my case? Thank you in advance.
The following is the code website:
Default.aspx
<%
@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><
html xmlns="http://www.w3.org/1999/xhtml"><
head runat="server"> <title>Untitled Page</title></
head><
body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<hr /> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label><br />
<asp:Label ID="Label3" runat="server" Text="Label"></asp:Label><br /> <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"> <asp:ListItem>Hello</asp:ListItem> <asp:ListItem>Goodbye</asp:ListItem> <asp:ListItem>Hola</asp:ListItem> <asp:ListItem>Adios</asp:ListItem> </asp:DropDownList> </ContentTemplate> </asp:UpdatePanel> <hr /> </div>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Label ID="Label4" runat="server" Text="Label"></asp:Label> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" /> </Triggers> </asp:UpdatePanel> <asp:Button ID="Button1" runat="server" Text="Button" UseSubmitBehavior="False" />
</form></
body></
html>Default.aspx.cs
using
System;using
System.Data;using
System.Configuration;using
System.Web;using
System.Web.Security;using
System.Web.UI;using
System.Web.UI.WebControls;using
System.Web.UI.WebControls.WebParts;using
System.Web.UI.HtmlControls;using
System.Web.Script.Services;using
System.Web.Configuration; public partial class _Default : System.Web.UI.Page{
protected void Page_Load(object sender, EventArgs e){
string nowAsString = DateTime.Now.ToLongTimeString();Label1.Text = nowAsString;
Label2.Text = nowAsString;
Label3.Text = DropDownList1.SelectedValue;
Label4.Text = nowAsString;
}
protected override void FrameworkInitialize(){
base.FrameworkInitialize(); if (Request.UserAgent.IndexOf("IEMobile") > -1) ClientTarget = "ie5";}
}
SKT_01
Participant
1930 Points
435 Posts
Re: Internet Explorer mobile seems doesn't recognize AJAX
Nov 03, 2008 12:28 PM|LINK
Hello sam.m,
first question:
Are you using the debug mode? ASP.NET AJAX does not work in IE Mobile in debug mode.
If you have further questions please post them.
Sam.m
0 Points
16 Posts
Re: Internet Explorer mobile seems doesn't recognize AJAX
Nov 04, 2008 05:40 AM|LINK
Hello SKT_01 ,
I don’t know what you mean by debugging on IE mobile…In fact I’m a beginner..But I want to inform you that I’ve too simply followed the steps mentioned in the video.Therefore,I’ve first tested my website on the localhost by debugging it.After I’ve noticed that it worked fine specially about AJAX,I’ve stopped the debugging .Then I’ve launched the device emulator manager ,then I’ve done « connect to windows mobile 6 professional emulator » then I’ve done « cradle ».Finally I’ve launched the internet explorer mobile browser on the emulator and I’ve tested the website on it by entering the website’s URL.
Is there anything wrong ?
Please help me..
SKT_01
Participant
1930 Points
435 Posts
Re: Internet Explorer mobile seems doesn't recognize AJAX
Nov 04, 2008 06:53 AM|LINK
I mean debugging in Visual Studio.
That's the reason, why ASP.NET AJAX does not work in IE Mobile.
cf. http://forums.asp.net/t/1134119.aspx
If you like to read a short article about ASP.NET AJAX and Internet Explorer Mobile cf. http://ttklf4.tempw8.internet1.de/AspDotNetAjaxMobile.aspx
Sam.m
0 Points
16 Posts
Re: Internet Explorer mobile seems doesn't recognize AJAX
Nov 11, 2008 12:53 PM|LINK
SKT_01
Participant
1930 Points
435 Posts
Re: Internet Explorer mobile seems doesn't recognize AJAX
Nov 11, 2008 12:58 PM|LINK
Hello Sam.m,
have you added the browser respective device definition? Otherwise IEMobile will not be detected as ASP.NET AJAX-capable.
SKT_01
Participant
1930 Points
435 Posts
Re: Internet Explorer mobile seems doesn't recognize AJAX
Nov 12, 2008 06:48 AM|LINK
Additional information:
I have uploaded the above mentioned sample with some modifications to my server: http://ttklf4.tempw8.internet1.de/m/t/Default1.aspx. This sample uses the browser definition for IEMobile and not the ClientTarget. Therefore I have left out the following code:
protected override void FrameworkInitialize() { base.FrameworkInitialize(); if (Request.UserAgent.IndexOf("IEMobile") > -1) ClientTarget = "ie5"; }Because ASP.NET AJAX .NET has changed from .NET Framework 2.0 to version 3.5 SP1 there may be some issues with Internet Explorer mobile and I will check them.
Sam.m
0 Points
16 Posts
Re: Internet Explorer mobile seems doesn't recognize AJAX
Nov 12, 2008 10:57 AM|LINK
I rechecked my website again and I have tried to test it with and without the browser definition for IE mobile.However,AJAX still doesn't work.Besides I've tried also to test the sample located on this link (http://msdn.microsoft.com/en-us/netframework/bb879961.aspx) .On the button click,the sentence "Searching images for cat" has returned without a page refresh but the rest (the images..)was not returned.Therefore,it appears that the web service was not invoked....
Anyway,if you find something new about my case can you notify me please?
Thank you a lot...
SKT_01
Participant
1930 Points
435 Posts
Re: Internet Explorer mobile seems doesn't recognize AJAX
Nov 15, 2008 12:30 PM|LINK
Currently I don't know why ASP.NET AJAX of the.NET Framework 3.5/3.5 SP1 no more works on IE Mobile.
The Ajax calls are send but the UpdatePanel is not updated. Only the second call causes an update. From the third call on I get the following error message if I click a button:
Line 5 Character:9340
Error: '__EVENTTARGET is null or not an object
Source:(null)
cf.: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.dotnet.framework.aspnet&mid=3f732e78-b665-4681-9bbb-60428ba40d7e
The same issues occur with the new Internet Explorer Mobile 6. While ASP.NET AJAX is working in Desktop View it doesn't in Mobile View.
PS: The link above has changed to http://ttklf4.tempw8.internet1.de/ASP_NET_AJAX_IE_Mobile.aspx
Sam.m
0 Points
16 Posts
Re: Internet Explorer mobile seems doesn't recognize AJAX
Nov 15, 2008 08:58 PM|LINK