Solved

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

Posted on 2012-03-23
8
676 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
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

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…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 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