?
Solved

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

Posted on 2012-03-23
8
Medium Priority
?
748 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
Independent Software Vendors: 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!

 
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month11 days, 3 hours left to enroll

770 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