Showing posts with label run. Show all posts
Showing posts with label run. Show all posts

Wednesday, March 28, 2012

installation requirements

What are the installation requirements for Atlas? I've got VS.NET 2005 Beta 2 (8.0.50110.28), but I get a FileNotFoundException when I try to run the install. I looked around on the web and in forums, but I couldn't find anyone else with a similar issue. Any ideas?Do you have a "Visual Studio 2005" directory under your My Documents folder? It should have a structure like this:
Visual Studio 2005
+ Code Snippets
+ Projects
+ Settings
+ Templates
+ Visualizers
Thanks,
I had a variation of the folder structure you mentioned... I had ItemTemplates and ProjectTemplates folders instead of a single Templates folder. (This was the default installation.) I added the Templates folder and tried running the Atlas installation again but got the same message -- FileNotFoundException. Is there an additional set of folders under the Templates directory that the install is looking for? Or a specific file in there?

Installing AJAX on a fresh machine

I have a requirement from a client that I will not be able to run the AJAX Extensions installer. Is there a list of what the installer does so that I can mimic it myself during deployment? If not, they're forcing me to go the Prototype route, and I don't want to do that.

Thanks for any advice.

Dan

Hi Dan,

Please try to get a copy the Ajax extension dll and install it into the GAC of the target computer withGacutil.exe

Installing AJAX Problems

Hi,

I'm trying to deploy AJAX on a production server. I've run the AJAX 1.0 Extensions msi installer and have verified that System.Web.Extensions/.Design v. 1.0.61025.0 are located in the GAC.

The website however tells me that the assembly wasn't able to be located:

Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.Source Error: Line 1:<%@dotnet.itags.org. Master Language="C#" AutoEventWireup="true" Codebehind="Site.master.cs" Inherits="BlackBox.Site" %>Line 2:<%@dotnet.itags.org. Register Assembly="System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"Line 3: Namespace="System.Web.UI" TagPrefix="asp" %>Line 4:<%@dotnet.itags.org. Register src="http://pics.10026.com/?src=StrategyStats.ascx" TagName="StrategyStats" TagPrefix="uc2" %>

When I copy System.Web.Extensions in my web application's bin folder I get:

Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)Source Error: Line 1:<%@dotnet.itags.org. Master Language="C#" AutoEventWireup="true" Codebehind="Site.master.cs" Inherits="BlackBox.Site" %>Line 2:<%@dotnet.itags.org. Register Assembly="System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"Line 3: Namespace="System.Web.UI" TagPrefix="asp" %>Line 4:<%@dotnet.itags.org. Register src="http://pics.10026.com/?src=StrategyStats.ascx" TagName="StrategyStats" TagPrefix="uc2" %>


Any ideas how to solve this?

Thanks

anyone? I'm a bit in a rush to get this solved for a production environment.

Thanks


Check your project references folder forSystem.Web.Extensionsand add it if it's not there.

Mine's referencing:
C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\System.Web.Extensions.dll

Good luck.


hmmmm ...

Why do you register that assembly again when it's already in the GAC? And it's probably in your Web.Config file already.


hmm... I didn't add those references, VS did when I added the Script Manager I think. However, when I take them out it works. Thanks!

Your project must have not been created asAJAX Enabled.

Another cool thing you may want to try is moving your AJAX tag prefixes to the web.config file. Try creating a new AJAX enabled website and examine the web.config for an example.


It actually was created as AJAX enabled Web Project and the web.config contains all the AJAX specific code. No clue why the register directives got added to the individual sites...

Monday, March 26, 2012

Integrate AjaxControls from Toolkit into VS 2005 Toolbox ?

Hi

I have just downloaded the Ajax Control Toolkit latest version. Although i did run "AjaxControlExtender.vsi"; however i cannot find the controls in the toolbox. Could anyone please point out how to integrate the controls from the toolkit into the toolbox. Thank you.

Regards,
NAB

Add on current toolbox, right click to add a new tab, name this what ever you want like AJAX Tool Kit.

Now locate the AjaxControlToolkit.dll assembly file, it should be where you installed it under the folder SampleWebSite\Bin. Drag this assembly and drop it into your new toolbox tab. All the toolkit controls should now be in this new tab.


It worked. Thanks a lot mate.

Intermittent Logic

Hello all

Atlas TimerControl does not run "intermittent logic". This sample shows that only numbers not peers are shown, say 1,3,5, ... an so on.

Then the logic If i Mod 2 = 0 .. "do something" is not possible, or - how to do that?
--

<%@dotnet.itags.org. Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
' Sample by Harvey Triana

Protected Sub tickerTimer_Tick( _
ByVal sender As Object, ByVal e As System.EventArgs) Handles tickerTimer.Tick
Me.lblPrompt.Text = "RenderCount: " & RenderCount.ToString
RenderCount += 1
End Sub

' RenderCount was initialized in Global.asax, Session_Start, Session.Add("RenderCount", 0)
Private Property RenderCount() As Integer
Get
Return CType(Session("RenderCount"), Integer)
End Get
Set(ByVal value As Integer)
Session("RenderCount") = value
End Set
End Property

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<atlas:ScriptManager runat ="server" ID="sm" EnablePartialRendering ="true" />
<!-- Timer Update Panel -->
<atlas:TimerControl runat="server" Interval="1500" ID="tickerTimer" OnTick="tickerTimer_Tick" />
<atlas:UpdatePanel runat="server" ID="up" Mode="Conditional" >
<Triggers>
<atlas:ControlEventTrigger ControlID="tickerTimer" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:Label ID="lblPrompt" runat="server"></asp:Label>
</ContentTemplate>
</atlas:UpdatePanel>
</div>
</form>
</body>
</html>


sorry, i say even, not "peers"

Internal Server Error - Webservice

I have a page that calls a webservice through Ajax ServiceManager. When I run the appication on my workstation everything is fine. When I move it to the server and access the page from the server it works fine. When I try to access it from my workstation I get "Internal Server Error". I have read the documentation on using Webservices in Ajax and I think I am doing everything correctly.. Any ideas?

Thanks,

Don

I think you have an authentication problem here. Maybethis thread will help you. Do you use forms authentication ?

Laurent


He Don.Net,

are you requesting your webservice from javascript? Can you past your code from your webservice here and the way you make a request to your webservice! thanks

Regards,


Found solution. Added the following to web.config.

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

Everything works fine now.

Thanks


I am having a similar problem and I'm getting frustrated. I have a (really) simple web service (running in SharePoint):

[WebMethod]
[System.Web.Script.Services.ScriptMethod]
publicdouble UpdateValue(double newValue)
{
// return 0;
thrownewException("There may have been an error. Or there may not have been. It's really hard to say.");
}

which I'm calling from AJAX on the client browser. If I uncomment the return 0 everything works fine. If I throw the exception above or any other exception all I recieve on the client is an HTTP 500 error. I have included the web.config changes listed above (and others I've found googling) and I still get the generic error. If I call this service from a Windows Form app I receive the correct exception (in the inner exception). How can I view on the client the exception I've thrown on the server? Any help would be greatly appreciated.

Thanks.


From my point of view is youre Problem by Design. Exceptions they are thrown in a WebService store there InnerExceptionMessage in a SOAP Message, If you're call the WebService with a Windows-App, a WebReference is created and the communication is via SOAP. JavaScript invoke the WebService via http, and you can't access the SOAP-Message with the Exception inside.

Hope that helps


Thanks for you're response. After further investigation I'm even more confused. And this may be a question for a SharePoint group instead. When my web service is in the _vti_bin virtual directory my AJAX request receives a generic 500 server error whenever I throw an exception. But if I move my web service to a new virtual directory, /services, then AJAX's get_StackTrace & get_Message are both populated correctly. I thought I could fix this through web.config changes but it may be something inherent to the way SharePoint virtualizes paths.


Im not sure that its a sharepoint specific problem. I believe its a .Net web services from js problem. And more specifically It appears to be in the authentication realm..

I say this because I am encountering the exact same 500 Internal Server error message from my javascript when I hit my CRM 3.0 web service from anywhere but the hosted server. I have tried the links above (adding <location path="myserviceweblocation"> around <system.web> as well as the <protocols>) and I am still encountering the problem. My intuition has led me to believe it was an authentication problem the entire time but its very hard to find a solution for this extremely generic error. It seems this is the most helpful group on the web. So even though this is an ajax forum would you guys mind giving me some help? Here is my web.config for my webservices virtual folder:

=======================================================================

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<location path="DupService">

<system.web>

<!-- DYNAMIC DEBUG COMPILATION

Set compilation debug="true" to enable ASPX debugging. Otherwise, setting this value to

false will improve runtime performance of this application.

Set compilation debug="true" to insert debugging symbols (.pdb information)

into the compiled page. Because this creates a larger file that executes

more slowly, you should set this value to true only when debugging and to

false at all other times. For more information, refer to the documentation about

debugging ASP.NET files.

-->

<compilation

defaultLanguage="c#"

debug="true"

/>

<!-- CUSTOM ERROR MESSAGES

Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.

Add <error> tags for each of the errors you want to handle.

"On" Always display custom (friendly) messages.

"Off" Always display detailed ASP.NET error information.

"RemoteOnly" Display custom (friendly) messages only to users not running

on the local Web server. This setting is recommended for security purposes, so

that you do not display application detail information to remote clients.

-->

<customErrors

mode="Off"

/>

<!-- AUTHENTICATION

This section sets the authentication policies of the application. Possible modes are "Windows",

"Forms", "Passport" and "None"

"None" No authentication is performed.

"Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to

its settings for the application. Anonymous access must be disabled in IIS.

"Forms" You provide a custom form (Web page) for users to enter their credentials, and then

you authenticate them in your application. A user credential token is stored in a cookie.

"Passport" Authentication is performed via a centralized authentication service provided

by Microsoft that offers a single logon and core profile services for member sites.

-->

<authentication mode="None" />

<!-- AUTHORIZATION

This section sets the authorization policies of the application. You can allow or deny access

to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous

(unauthenticated) users.

-->

<authorization>

<allow users="*" /> <!-- Allow all users -->

<!-- <allow users="[comma separated list of users]"

roles="[comma separated list of roles]"/>

<deny users="[comma separated list of users]"

roles="[comma separated list of roles]"/>

-->

</authorization>

<!-- APPLICATION-LEVEL TRACE LOGGING

Application-level tracing enables trace log output for every page within an application.

Set trace enabled="true" to enable application trace logging. If pageOutput="true", the

trace information will be displayed at the bottom of each page. Otherwise, you can view the

application trace log by browsing the "trace.axd" page from your web application

root.

-->

<trace

enabled="true"

requestLimit="10"

pageOutput="true"

traceMode="SortByTime"

localOnly="true"

/>

<!-- SESSION STATE SETTINGS

By default ASP.NET uses cookies to identify which requests belong to a particular session.

If cookies are not available, a session can be tracked by adding a session identifier to the URL.

To disable cookies, set sessionState cookieless="true".

-->

<!--<sessionState

mode="InProc"

stateConnectionString="tcpip=127.0.0.1:42424"

sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"

cookieless="false"

timeout="20"

/>-->

<!-- GLOBALIZATION

This section sets the globalization settings of the application.

-->

<globalization

requestEncoding="utf-8"

responseEncoding="utf-8"

/>

<webServices>

<protocols>

<add name="HttpGet"/>

<add name="HttpPost"/>

</protocols>

<webservices>

</system.web>

</location>

</configuration>

==================================================================

Mostly generic stuff. As a note I have tried the most generic web service (hello world) and very simple XmlHttp javascript objects.


Found a solution. I must admit Im a bit curious as to why it didnt show up anywhere else.

Web service which was only a test application was running on the C:\testService folder and linked via IIS. When it was moved to the Inetpub\wwwroot directory AND added:

<system.web>

<webServices>

<protocols>

<add name="HttpGet"/>

<add name="HttpPost"/>

</protocols>

<webServices>

</system.web>

Then it began to work on all systems.

Saturday, March 24, 2012

Internet Explorer 5.5

I have a small Atlas project and it will only work with Internet Explorer 6.+ Does Atlas support IE 5.5? When I run the application I get a java script error.ATLAS utilizes many new features(Javascript & XML) only found in new browsers. As it stands I beleive it only works with IE 6+

hello.

i haven't tested it in IE5.5 but it expected it to be supported in that version. well, i'd guess that since 7.0 is out, they won't make any efforts to support it (btw, is there any good reason for not upgrading at least to IE 6?)

Wednesday, March 21, 2012

is calling to a webservice ?

I have a javascript that run every 5 mins. However, if the client is calling a webservice and wating for the result, i want to delay the script execution. So is there anyway to know that the client is calling to a webservice ?

Nothing out of the box, that I'm aware of. If you control the webservice call (e.g. calling it as a result of an event) then the simplest thing would be to populate a global boolean to true when the call gets sent and then change it to false in the onComplete and OnError handlers for the webservice.


Hi,MrVithan

Try the folloeing code:

Default.aspx:

<%@. Page Language="C#" %>

<!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>Untitled Page</title>

<script type="text/javascript">
// This function calls the Web Service method.
function EchoUserInput()
{
//Do something you want to do, e.g.delay the script execution
var echoElem = document.getElementById("EnteredValue");
WebService.HelloWorld(echoElem.value,SucceededCallback);
}
// This is the callback function that processes the Web Service return value.
function SucceededCallback(result)
{
var RsltElem = document.getElementById("Results");
RsltElem.innerHTML = result;
// Change the delay of the script execution back.
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="WebService.asmx" />
</Services>
</asp:ScriptManager>
<div>
<h2>
Simple Web Service</h2>
<p>
Calling a simple service that echoes the user's input and returns the current server
time.</p>
<input id="EnteredValue" type="text" />
<input id="EchoButton" type="button" value="Echo" onclick="EchoUserInput()" />
</div>
</form>
<hr />
<div>
<span id="Results"></span>
</div>
</body>
</html>

WebService.asmx:

<%@. WebService Language="C#" Class="WebService" %>

using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class WebService : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld(String input)
{
System.Threading.Thread.Sleep(3000);
string inputString = Server.HtmlEncode(input);
if (!String.IsNullOrEmpty(inputString))
{
return String.Format("You entered {0}. The current time is {1}.", inputString, DateTime.Now);
}
else
{
return "The input string was null or empty.";
}
}
}

Hope this helps.

Let me know if you need more info.
You can also see this thread for more help:http://forums.asp.net/t/1115018.aspx

Is is required to install AJAX extension in the server to run ajax enabled site

Hi,

I have a .net application using Ajax extensions and tool kit. Now I am trying to deploy it in Win 2003 server.

After installation when I try to open the application I get the following error:

"Could not load file or assembly 'System.Web.Extensions, "

I wanted to know if it is required that I have to manually install the Ajax extension on the server. Or the dll in the bin folder of my project for the Ajax extension is enough.

Thanks

gayathri.

I think it needs to reside in the GAC on the server. I had a similar issue.


Eric


Thanks eseidel,

Could you please say me how u resolved it. I have not done anything on GAC earlier.

Thanks,

Gayathri.


Hi Gayathri,

Install ASP .Net Ajax in the server (this automatically registers the dlls in the GAC). This should take care of the problem.

If this is not possible then you have to manually register the dll in the GAC. For this you can do two things:

1. Drag and drop the dll into c:\Windows\Assembly or

2. Use GACUtil. Check out this link to get a clear idea of using the utility.

http://msdn2.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx

hope this helps.

Thanks,

Raja


Could you possibly tell me which file i'd need to download... preferably the location for the asp.net ajax framework for the dedicated servers?


Hi, My problem was resolved after installling the ASP.net AJax Extension MSI in my server.

You don't have to place it in any specific location. Just download the latest version of the Ajax Extension Framework from the ASP.net AJax site and install the MSI in your server. After the installation, you should be able to see the files in the below path in your server

"C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\"

-Gayathri

Is it a bug? Using animations in a masterpage doesnt work. Please help.

This is the error I get when I run the page:

Sys.ArgumentException: AjaxControlToolkit.Animation.Animation.set_animationTarget requires the ID of a Sys.UI.DomElement or Sys.UI.Control. No element or control could be found corresponding to "Panel2".

Here is the masterpage:

<%@dotnet.itags.org.MasterLanguage="VB"CodeFile="MasterPage2.master.vb"Inherits="MasterPage2" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headid="Head1"runat="server">

<title>Is it a bug?</title>

</head>

<body>

<formid="form1"runat="server">

<asp:ScriptManagerID="ScriptManager1"runat="server">

</asp:ScriptManager>

<ajaxToolkit:AnimationExtenderID="AnimationExtender1"runat="server"TargetControlID="Panel1">

<Animations>

<OnHoverOver>

<FadeOutDuration=".5"Fps="20"AnimationTarget="Panel2"/>

</OnHoverOver>

<OnHoverOut>

<FadeInDuration=".5"Fps="20"AnimationTarget="Panel2"/>

</OnHoverOut>

</Animations>

</ajaxToolkit:AnimationExtender>

<asp:PanelID="Panel1"runat="server"Height="50px"Width="125px">Text to hover over.</asp:Panel>

<br/>

<br/>

<asp:PanelID="Panel2"runat="server"Height="50px"Width="125px">Text to fade out.</asp:Panel>

<asp:contentplaceholderid="ContentPlaceHolder1"runat="server">

</asp:contentplaceholder>

</form>

</body>

</html>

Here is the small example page:

<%@dotnet.itags.org.PageLanguage="VB"MasterPageFile="~/MasterPage2.master"AutoEventWireup="false"CodeFile="Test7.aspx.vb"Inherits="Test7"title="Untitled Page" %>

<asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">

Just some text

</asp:Content>

Here is a page where it works just fine, not using a master page:

<%@dotnet.itags.org.PageLanguage="VB"AutoEventWireup="false"CodeFile="Test8.aspx.vb"Inherits="Test8" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>Untitled Page</title>

</head>

<body>

<formid="form1"runat="server">

<asp:ScriptManagerID="ScriptManager1"runat="server">

</asp:ScriptManager>

<ajaxToolkit:AnimationExtenderID="AnimationExtender1"runat="server"TargetControlID="Panel1">

<Animations>

<OnHoverOver>

<FadeOutDuration=".5"Fps="20"AnimationTarget="Panel2"/>

</OnHoverOver>

<OnHoverOut>

<FadeInDuration=".5"Fps="20"AnimationTarget="Panel2"/>

</OnHoverOut>

</Animations>

</ajaxToolkit:AnimationExtender>

<asp:PanelID="Panel1"runat="server"Height="50px"Width="125px">

Text to hover over.</asp:Panel>

<br/>

<br/>

<asp:PanelID="Panel2"runat="server"Height="50px"Width="125px">

Text to fade out.

</asp:Panel>

</form>

</body>

</html>

Can you please try to help me to figure out what is wrong with this, please?

Hi ,

In the working and the non-working scenario , go to the view-source of the page and copy the $create Function call and post it here .

Hope this helps


OK, I will gladly post the different results:

Here is the working one:

<script type="text/javascript">
<!--
Sys.Application.initialize();
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.Animation.AnimationBehavior, {"OnHoverOut":"{\"AnimationName\":\"FadeIn\",\"Duration\":\".5\",\"Fps\":\"20\",\"AnimationTarget\":\"Panel2\",\"AnimationChildren\":[]}","OnHoverOver":"{\"AnimationName\":\"FadeOut\",\"Duration\":\".5\",\"Fps\":\"20\",\"AnimationTarget\":\"Panel2\",\"AnimationChildren\":[]}","id":"AnimationExtender1"}, null, null, $get("Panel1"));
});
// -->
</script>

And here is the non working one.

<script type="text/javascript">
<!--
Sys.Application.initialize();
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.Animation.AnimationBehavior, {"OnHoverOut":"{\"AnimationName\":\"FadeIn\",\"Duration\":\".5\",\"Fps\":\"20\",\"AnimationTarget\":\"ctl00_Panel2\",\"AnimationChildren\":[]}","OnHoverOver":"{\"AnimationName\":\"FadeOut\",\"Duration\":\".5\",\"Fps\":\"20\",\"AnimationTarget\":\"Panel2\",\"AnimationChildren\":[]}","id":"ctl00_AnimationExtender1"}, null, null, $get("ctl00_Panel1"));
});
// -->
</script>

Just for reference

My Panel 2 is named: ctl00_Panel2

when using a master page. This is strange I think. But the javascript seems to want Panel2 which can be seen at the end of this javascript.


Hi,

The names of the controls getting changed upon placing them in a master page is expected.

Can you see controls named ctl00_Panel1 and ctl00_Panel2 in the View-Source ?


Sorry for my late reply.

Yes, I can see the ctl00_Panel1 and ctl00_Panel2 in the source code.

However, I can't see Panel2 in the source code, but the Javascript seems to be referring to Panel2 as well as ctl00_Panel2.

Any suggestions?


It's normal to see so. This is the internal behavior of asp.net that its client side id is changed when the control is in a namingContainer.

You may change the AnimationTarget="Panel2"/> toAnimationTarget="ctl00_Panel2"/>


ok , this looks really weird ..

if you see the $create call in the non-working one , the TargetControlIDs are messed up

<script type="text/javascript">
<!--
Sys.Application.initialize();
Sys.Application.add_init(function() {
\",\"AnimationTarget\":\"ctl00_Panel2

blahblahblah

\",\"AnimationChildren\":\",\"AnimationTarget\":\"Panel2\",\"AnimationChildren\":});

</script>
Temporary Workaround for this :

IN the Markup , Change AnimationTarget to be AnimationTargetScript ="GetID();"

<scriptlanguage="javascript">

function GetID() {

var panelID = <%=Panel1.ClientID %>

return panelID;

}

</script>

Hope this helps , lemme know if I missed anything


Raymond Wen - MSFT:

It's normal to see so. This is the internal behavior of asp.net that its client side id is changed when the control is in a namingContainer.

You may change the AnimationTarget="Panel2"/> toAnimationTarget="ctl00_Panel2"/>

Your change worked just fine. Thanks a million!!!Big Smile

I hope that this is fixed in the next version of the control toolkit. I can wish atleast.


Phanatic:

ok , this looks really weird ..

if you see the $create call in the non-working one , the TargetControlIDs are messed up

<script type="text/javascript">
<!--
Sys.Application.initialize();
Sys.Application.add_init(function() {
\",\"AnimationTarget\":\"ctl00_Panel2

blahblahblah

\",\"AnimationChildren\":\",\"AnimationTarget\":\"Panel2\",\"AnimationChildren\":});

</script>
Temporary Workaround for this :

IN the Markup , Change AnimationTarget to be AnimationTargetScript ="GetID();"

<scriptlanguage="javascript">

function GetID() {

var panelID = <%=Panel1.ClientID %>

return panelID;

}

</script>

Hope this helps , lemme know if I missed anything

Hello. When I try this, I get "Sys.ArgumentTypeException: Object of type 'Object' cannot be converted to type 'String'. Parameter name: id"

Thanks for helping me!


Thats right ! When the script ran , it converted the ID to be an actual object .

dunno if I am making senseSmile .

The idea is to avoid one from hard-coding the names of the Target Controls . What if you added another contentPlaceHolder tomorrow ?

Hope this helps


I think Phanatic's code has a bug... try:

function GetId() { return '<%= Panel1.ClientID %>'; }

(note the quotes)


Hi,

Right ! the Code is faulty . It passes the ID without any quotes and hence is interpreted as an object.

But , I think the main thing here is :

If you see the $create Function rendered with a MasterPage in the picture .

The same JSON representation for the animation has the complete ID including the ContentPlace holder's ID "ctl00_Panel2" and also without the ContentPlaceHolder as a container , Panel2.

<script type="text/javascript">
<!--
Sys.Application.initialize();
Sys.Application.add_init(function() {
\",\"AnimationTarget\":\"ctl00_Panel2

blahblahblah

\",\"AnimationChildren\":\",\"AnimationTarget\":\"Panel2\",\"AnimationChildren\":});

</script>

Is it necessary to run the Asp.Net Ajax Installation Wizard

I have an issue where my web project works well locally with AJAX, Update Panels and Partial Rendering. Everything is kosher.

As soon as I copy my project to a staging server, any page that uses Validators that become enabled through Partial Rendering seem to have issues. The validators cause script errors on some pages, while on others, they are not visible.

The only difference between my local environment (that I can think of) that may affect this is that I ran the AJAX installation on my local workstation while on the Test Server I just copied the Ajax DLLs into the bin folder.

So does anyone know this may be my problem? Is it necessary to run the full install of ASP.Net AJAX for everything to work well? If not then I may need to resort to custom Javascript for client validation which I'd rather avoid since I can't run the install on the server.

no, but you will need to include the AJAX DLLs in your BIN folder then.


Thanks for your reply! It's good that all I need are the dll's since that's all I have access to do. But that now raises the question of why is it all good locally and not remotely on my test server.

Oh well.. I guess I have 2 options:
(1) Javascript for validation
(2) No partial-rendering.. postbacks and use FakeAjax transitions to make nice ajax-like UI.


alcsharp:

Thanks for your reply! It's good that all I need are the dll's since that's all I have access to do. But that now raises the question of why is it all good locally and not remotely on my test server.

Locally the Ajax DLLs are in the GAC, since you used the Installation Wizard. On the server they aren't there, so you need to explicitly include them.


Oh, and I'm betting you are missing a DLL...
What did you include?


I only included System.Web.Extensions.dll. Since I'm not using the Control Toolkit at all I didn't add it.