Solved

ajax components not working after publishing to webserver asp.net c#

Posted on 2012-03-23
8
722 Views
Last Modified: 2012-04-17
I've created a test page as i'm having a lot of trouble with AJAX components. I've got a button with a roundcorner controller attached to it and a script manager. It shows the button with the round corners ok during development on localhost but as soon as I publish it onto the webserver it only shows a normal button.

What am I doing wrong please?

Many Thanks
Lee
0
Comment
Question by:Codingitup
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 

Author Comment

by:Codingitup
ID: 37756207
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="DijonIntranet.NonInv.Issue.test" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<!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></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:Button ID="Button1" runat="server" Text="Button" />
        <asp:RoundedCornersExtender ID="Button1_RoundedCornersExtender" runat="server" 
            Enabled="True" TargetControlID="Button1">
        </asp:RoundedCornersExtender>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    
    </div>
    </form>
</body>
</html>

Open in new window

0
 
LVL 7

Expert Comment

by:markmiddlemist
ID: 37756230
2 things I'd try first:

1) move the script manager to just after the form tag
2) in place of the asp script manager use the ajaxcontroltool script manager:

e.g.

<asp:ToolkitScriptManager ID="ScriptManagerMaster" runat="server" />
0
 

Author Comment

by:Codingitup
ID: 37756333
No joy i'm afraid. I've tried the following: -

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="DijonIntranet.NonInv.Issue.test" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<!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></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <div>
    
        <asp:Button ID="Button1" runat="server" Text="Button" />
        <asp:RoundedCornersExtender ID="Button1_RoundedCornersExtender" runat="server" 
            Enabled="True" TargetControlID="Button1">
        </asp:RoundedCornersExtender>
        
    
    </div>
    </form>
</body>
</html>

Open in new window


and tried: -

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="DijonIntranet.NonInv.Issue.test" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<!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></title>
</head>
<body>
    <form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    <div>
    
        <asp:Button ID="Button1" runat="server" Text="Button" />
        <asp:RoundedCornersExtender ID="Button1_RoundedCornersExtender" runat="server" 
            Enabled="True" TargetControlID="Button1">
        </asp:RoundedCornersExtender>
        
    
    </div>
    </form>
</body>
</html>

Open in new window


Best Regards
Lee
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 7

Expert Comment

by:markmiddlemist
ID: 37756742
Are you getting any javascript errors displayed when the page loads?

If you're using IE try opening the developer tools (press F12), click on the console tab, then back in the main browser window refresh the page
0
 

Author Comment

by:Codingitup
ID: 37756884
ah ok..... I'm getting the error: -

SCRIPT65535: Unexpected call to method or property access.
ScriptResource.axd?d=kTpTGL9yH-DAypUTg8qxbuvj9YKuuDon-diH7XYCuEHqsTevwauoIEWYh2dOmKhbLFDfgWQB7GHpz8S1diu3bJrV1Nq9-CCep5RqRyND2p81&t=252a36c5, line 280 character 25

the line is identified as:

e.insertBefore(newDiv, lastDiv);

Best regards
Lee
0
 
LVL 7

Expert Comment

by:markmiddlemist
ID: 37757118
OK, from experience of getting that error it normally comes due to the call to the web service being blocked by asp.net's built-in security

Try adding the following in the system.web section of your web.config:

      <webServices>
          <protocols>
              <add name="HttpGet"/>
              <add name="HttpPost"/>
          </protocols>
      </webServices>
0
 

Author Comment

by:Codingitup
ID: 37764511
Hi,

Still no joy i'm afraid.

Best Regards
Lee
0
 
LVL 7

Accepted Solution

by:
markmiddlemist earned 500 total points
ID: 37764671
OK, just done a bit of research and unfortunately found this post -http://forums.asp.net/t/1155650.aspx/1 - amongst others saying that the RoundedCornersExtender cannot be applied to the button control, and CSS is probably the way to go instead
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question