AJAX Works Locally in VS2005 but not on Web

S

schmeckel

I am trying to use some very basic AJAX functionality (update panel
for partial page update) on my website. When I run my webpage in VS
2005, the partial page update works fine. However, when I upload the
page to my website and try running it, the page updates as a full page
update rather than a partial page update. I believe the web.config
I'm using is correct and I have also put the System.Web.Extensions dll
in my BIN folder.

Can anyone tell me if there is something else that has to be done in
order to get AJAX functionality to work on the web?

Any help would be appreciated.


Thanks,

Schmeckel
 
S

schmeckel

Ben -

I looked at everything that was in your list and even copied you
web.config. Things are still not working on the web but are fine on
my machine.

For your information, I am just trying a VERY basic example and I
can't get it to work on the web. Here is the code for the page:

<%@ 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"
EnablePartialRendering="True" />
<asp:Label ID="Label1" runat="server" Text="Label"
Width="125px"></asp:Label><div>
This is a test screen<br />
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label2" runat="server" Text="Label"
Width="125px"></asp:Label>
<asp:Button ID="Button1" runat="server"
OnClick="Button1_Click" Text="Button" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>

Do you see anything stupid that would prevent it from working on the
web but allow it to work locally?

As I said before, any help would be appreciated.


Thanks again,

Schemckel
 
S

schmeckel

Ben -

I looked at everything that was in your list and even copied you
web.config. Things are still not working on the web but are fine on
my machine.


For your information, I am just trying a VERY basic example and I
can't get it to work on the web. Here is the code for the page:


<%@ 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"
EnablePartialRendering="True" />
<asp:Label ID="Label1" runat="server" Text="Label"
Width="125px"></asp:Label><div>
This is a test screen<br />
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label2" runat="server"
Text="Label"
Width="125px"></asp:Label>
<asp:Button ID="Button1" runat="server"
OnClick="Button1_Click" Text="Button" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>


Do you see anything stupid that would prevent it from working on the
web but allow it to work locally?


As I said before, any help would be appreciated.


Thanks again,

Schmeckel
 
J

James Irvine

Your partial page update seems to work ok on my test site:

http://www.mypichost.biz/aTest.aspx

It's your code verbatim, except I added a datetime check just to see
whats being updated:

protected void Button1_Click(object sender, EventArgs e)
{
Label2.Text = DateTime.Now.ToString();
}
 
O

OD

do not forget your host must install a part of MS Ajax on his server,
something you can't do for him.
It's perhaps the reason.
 
S

schmeckel

I have my own hosting account, so I just need to know what files have
to be installed. The only dll I've put on my server is the
System.Web.Extenstions. Is there something else that I'm missing?

Thanks again for all of the help!

Schmeckel
 
K

kwendex

If you follow the link I posted earlier you'll see there that i give a
link to the installer you must run on the server.
 
S

schmeckel

First of all, I need to make a clarification. I have a shared hosting
account, not a dedicated account so I don't believe I am able to run
the install that Ben is talking about. I think my problem is that my
account is with Godaddy and I don't think they know what has to be
setup to make things work. I spent 30 minutes on the phone with
someone who was pretty clueless and ended the conversation no further
along than when I started. According to their documentation, they
have installed the System.Web.Extensions dll in the GAC so that
shouldn't be the problem. If there is something else that has to be
done, they don't know about it. If anyone out there has gotten AJAX
to work on a Godaddy site, your help would be greatly appreciated.

Thanks to all of you who have helped so far.


Schmeckel
 
S

schmeckel

I got it figured out. In the testing that I was doing, I was using a
subdirectory as a test site. For example, if my site was www.schmeckel.net,
I was using www.schmeckel.net/ajaxtest as the place I was putting my
code AND my web.config. After messing around with it for a while, I
moved the web.config in the www.schmeckel.net directory and everything
worked fine.

Thanks again to everyone who helped out!!!


Schmeckel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top