Solved

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

Posted on 2012-03-23
8
636 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
  • 4
  • 4
8 Comments
 

Author Comment

by:Codingitup
Comment Utility
<%@ 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
Comment Utility
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
Comment Utility
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
 
LVL 7

Expert Comment

by:markmiddlemist
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Codingitup
Comment Utility
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
Comment Utility
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
Comment Utility
Hi,

Still no joy i'm afraid.

Best Regards
Lee
0
 
LVL 7

Accepted Solution

by:
markmiddlemist earned 500 total points
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now