Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

UpdatePanel.Update() doesn't work in Firefox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mel - 21 Apr 2008 18:44 GMT
I have an update panel that has the UpdateMode set to "Conditional".
When I call UpdatePanel1.Update() in the VB code it does not work in
FireFox.  It works just fine in Internet Explorer 6.0.  Any ideas on
how to fix it so it works in FireFox 2.0.0.14?
Andy - 21 Apr 2008 18:59 GMT
Because the updatepanel runs on the client and renders part of the
page without calling the server, I'm assuming that the script manager
that it runs on is implemented as a Microsoft behavior.  Firefox,
Netscape, Mozilla, IE4 and earlier do not support Microsoft
behaviors.  You can test if this is the problem by trying to run your
stuff on these other browsers.  If it is because of behaviors, then
your app won't work on these either.

W3C has another HTML extensibility model equivalent to MS behaviors
called Actions.  To get your stuff to work on Netscape based browsers,
you will have to re-implement the script manager and update panel
controls as Actions (or see if somebody else has already done that).
Mel - 21 Apr 2008 19:58 GMT
> Because the updatepanel runs on the client and renders part of the
> page without calling the server, I'm assuming that the script manager
[quoted text clipped - 8 lines]
> you will have to re-implement the script manager and update panel
> controls as Actions (or see if somebody else has already done that).

Anyone know anything about implementing the update panel as Actions?
gerry - 21 Apr 2008 20:32 GMT
forget about this actions malarky - can you post an example that
demonstrates the issue ?

>> Because the updatepanel runs on the client and renders part of the
>> page without calling the server, I'm assuming that the script manager
[quoted text clipped - 10 lines]
>
> Anyone know anything about implementing the update panel as Actions?
gerry - 21 Apr 2008 20:55 GMT
for example , this works just fine in ie/ff/opera/...

===== WebForm1.aspx =======
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs"
Inherits="Web.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
 <head runat="server">
   <title>Untitled Page</title>
 </head>
 <body>
   <form id="form1" runat="server">
     <div>
       <asp:ScriptManager ID="ScriptManager1" runat="server" />
       <asp:UpdatePanel ID="UpdatePanel1" runat="server"
UpdateMode="Conditional">
         <ContentTemplate>
           1 <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
           <asp:Button ID="Button1" runat="server" Text="Just 1"
onclick="Button1_Click" />
           <asp:Button ID="Button3" runat="server" onclick="Button3_Click"
Text="Both" />
         </ContentTemplate>
       </asp:UpdatePanel>
       <asp:UpdatePanel ID="UpdatePanel2" runat="server"
UpdateMode="Conditional">
         <ContentTemplate>
           2 <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
           <asp:Button ID="Button2" runat="server" Text="Just 2"
onclick="Button2_Click" />
         </ContentTemplate>
       </asp:UpdatePanel>
     </div>
   </form>
 </body>
</html>

====== WebForm1.aspx.cs =========

using System;
namespace Web
{
 public partial class WebForm1 : System.Web.UI.Page
 {
   protected void Page_Load( object sender , EventArgs e )
   {
   }
   private void UpdateThings()
   {
     TextBox1.Text = TextBox2.Text = DateTime.Now.ToString(
"hh:mm:ss.ffffff" );
   }
   protected void Button1_Click( object sender , EventArgs e )
   {
     UpdateThings();
   }
   protected void Button3_Click( object sender , EventArgs e )
   {
     UpdateThings();
     UpdatePanel2.Update();
   }
   protected void Button2_Click( object sender , EventArgs e )
   {
     UpdateThings();
   }
 }
}

> forget about this actions malarky - can you post an example that
> demonstrates the issue ?
[quoted text clipped - 13 lines]
>>
>> Anyone know anything about implementing the update panel as Actions?
bruce barker - 21 Apr 2008 20:39 GMT
the update panel supports ff and safari, no additional code is required.

-- bruce (sqlwork.com)

> > Because the updatepanel runs on the client and renders part of the
> > page without calling the server, I'm assuming that the script manager
[quoted text clipped - 10 lines]
>
> Anyone know anything about implementing the update panel as Actions?
Mel - 21 Apr 2008 21:17 GMT
> > Because the updatepanel runs on the client and renders part of the
> > page without calling the server, I'm assuming that the script manager
[quoted text clipped - 10 lines]
>
> Anyone know anything about implementing the update panel as Actions?

Fixed.  Apparently this is a known issue with images in UpdatePanels.
I "change" the imageURL of the imagebutton to something different each
time, by appending "?a=" followed by a number which gets incremented
each time.  Now the image updates properly.
bruce barker - 21 Apr 2008 20:38 GMT
most likely you have a scripting error on the page that prevents the ajax
call. install firebug in ff and see what your error is.

.Update is a server sde method, so if it is firing with ff, then you have a
serverside error, as this means the ajax library is running.

-- bruce (sqlwork.com)

> I have an update panel that has the UpdateMode set to "Conditional".
> When I call UpdatePanel1.Update() in the VB code it does not work in
> FireFox.  It works just fine in Internet Explorer 6.0.  Any ideas on
> how to fix it so it works in FireFox 2.0.0.14?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.