Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2012-03-23
8
Medium Priority
?
772 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

618 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