Showing posts with label writing. Show all posts
Showing posts with label writing. Show all posts

Wednesday, March 28, 2012

Why use Asp.Net Ajax

I am debating between using Asp.Net Ajax and "regular" Ajax. As of now I have used Ajax by writing the javascript files and the web service/web pages that does the XmlHttpRequest.

So my question is what benefit would I get from using Asp.Net Ajax.

For the most part, AJAX is AJAX. ASP.NET would be your deciding factor, over a different technology. But if you're currently using ASP.NET and creating the AJAX functions by hand, the toolkit will alleviate the need for hand coding.

Jeff


How does the toolkit render the page, if I add some Asp.Net Ajax tools to an already existing Asp.Net page will my viewstate get bigger, will Microsoft add some code to the page to make it work that I don't know about.

ASP.NET AJAX - it's easy, quick and it's fun. :)

You can use notepad to write your .NET application, but you can use the Visual Studio ...

You can do AJAX functionality by hand, but you can use ASP.NET AJAX...


with asp.net you pass beyonde web pages u build web applications wth easy use of ADO.NET and so on... I would suggest you to try asp.net.. enjoy exploring cause this is basicliy what I'm doing...


It's a good question.

The thing is ASP.NET AJAX gives you all these things with a Microsoft Support team behind it:

1) Client side AJAX API - probably much like the one you've written but almost certainly far, far bigger. It can also call SOAP Web Services, Static aspx Page methods, serialize and deserialize objects and supports "classical class inheritance" with interfaces. It's a pretty good client side API and has had some very clever people develop it. The CTP also has a taster of even more ambitious Client APIs like XmlScript, DataTables and DataSources. Its not perfect by any means but I understand the next version of Visual Studio will include full Javascript intellisense for it which could be very cool indeed - especially if it alo makes it into the Express versions of that product (which I would expect it to).

2) Server Side API - Based around the Script Manager and UpdatePanels mostly. Update Panels are rediculously easy to use although FAR from optimal AJAX but have the huge benefit of "degrading" to a normal postback if Javascript is disabled. Conversely, the Bandwidth used for SOAP WebMethods could hardly *BE* more optimal, using pure Json up and down the pipe - fantastic value for money!!

3) Client Server integration: easily pass objects from client to server and back again.

4) Ajax Control toolkit - a set of Widgets to easily add cross browser GUI controls that take advantage of AJAX

5) Provides a defined Ajax Framework which is backed by microsoft, something non of the other frameworks can offer. The more popular ASP.NET AJAX becomes, the more community it gets and the better it gets. Dojo, Prototype, Bindows are all great but will always remain a little marginalised by something like ASP.NET AJAX.

6) This community and others like it.

I think it's fair to say that given where ASP.NET 2 used to be, with its postback architecture to where it is now (with ASP.NET AJAX) I think is a great improvement indeed, just the act of popping an update panel on an existing ASP.NET page can transform it from being humdrum and ordinary to something with much greater response and even "Wow" factor as it will only do a partial render (less bandwidth), there is no flicker (as the page does not get discarded) and the page scroll position does not need to be affected. 100% better already.

I would also say that although much of it comes across as "Ajax for dummies" (although you could also say that about the other Ajax frameworks out there) I think there is plenty of scope there also to create nice, optimal interfaces, additional toolkit widgets and other reusable AJAX enabled objects but the real key is the support and the continued development by some very, very talented people. Fundamentally I think the "ASP.NET" thing gets in the way of the "AJAX" thing and can make things far more complex than they need to be but ultimately, if you are using Visual Studio (full or express) and are creating Web Applications or dynamic sites then ASP.NET AJAX is the way to go.

Or to put i another way, what do you think will get you your next job in a programming team, saying you've written this killer AJAX framework and use it all the time and it "works great form me", or saying that you have mastered the "industry standard" AJAX toolkit and can leverage the knowledge therein, and which may well be the AJAX toolkit your next employer is already using? Trust me when I say I was in that position offering the former, I showed them my widgets, my treeview, my resizer bars, my fake windows, my serialization objects, my lazy loading, my drag and drop, my menuing system, my eventing system, my animation system, even my 2D and 3D graphics engine, all pure javascript and all built in - yes I got the job but had to promise to learn ASP.NET AJAX straight away if I wanted to do that kindof thing (ie: it's industry standard and the other developers can then work on my code, ie I remain dispensible, which is what they want).


Just the answer I was looking for.

VR2 you said:

"yes I got the job but had to promise to learn ASP.NET AJAX straight away if I wanted to do that kindof thing"

For you to learn straight away what books/websites, if any, did you use to move from your old way of writing ajax apps to Asp.net Ajax?


Another question:

Is there any speed difference when using Asp.Net Ajax compared to other Ajax Frameworks, and does anyone know if search engines look at the pages differently.


You can start from

http://ajax.asp.net/docs/

http://ajax.asp.net/documentation/default.aspx?tabid=47


"For you to learn straight away what books/websites, if any, did you use to move from your old way of writing ajax apps to Asp.net Ajax?"

I got a book called "Programming Atlas" which I nearly threw out in disgust until I was told that the stuff it talks about still exists but in the CTP (and in a modified form). Also this website has been invaluable. I have to say though that I'm still just finding my feet not only with this but with ASP.NET also (I previously used COM, VB6, asp classic & javascript).

As to the speed of ASP.NET AJAX - I'd imagine that it depends what you are comparing it with and *how* you are doing it.

In general UpdatePanels will be slow and clunky (by comparison) but will offer extreme ease of use and a server based event architecture using the well established and frankly huge ASP.NET 2. And it will degrade for the mobiles etc!

Web Services and Static Page Methods will be fast and nimble but - what do you DO with the data once you have it? This is where you need a strong client side API (widgets) to display and allow the user to manipulate the data WITHOUT needing update panels to post back the viewstate every click (so that server events can fire and update the server version of the page DOM and send it all back again).

And this is where the CTP could come into play, just so long as you don't need to be able to downgrade for Mobile Phones! For example, I did an experiment using the CTP client side DataSource and DataTable - and a server side DataService or WebService (wrapping calls to a TableAdapter) where you could simply instatiate these objects on the client and have a grid that was effectively 2 way databound to the datasource, meaning that the user could update any data in the grid they wanted and the DataSource would post only the changes back to the server using JSON. The custom grid object tool a while to write as an extender in the AjaxToolkit but once written, in 2 minutes you could have this up and running and it was as optimal as you like.

Saturday, March 24, 2012

Working in Dev but not on server

Hi

I am writing my first AJAX enabled application, and I am having problems deploying it. I have created a simple autocomplete app in VS 2005 which reads values from a SQL database and returns them as an autocomplete list. This works fine on the development machine, but when I publish the app and copy the files to the server, the AJAX part of the page does not work (non AJAX parts do) I have installed the ASP.NET AJAX from http://asp.net/ajax/ on both the server and the development machine. Following publishing the app to a local drive, the only change I have made is to the SQL connection string. I have stripped the web service down to a "hello world" application to remove the connection string from the equation and this still does not work. I would be very grateful for any ideas.

Thanks

Hi,

Could you please paste the error that you are receiving here?

Thanks


You must have to install the Asp.net Ajax Framework in you server. Also you have to have the AjaxControlToolkit dll in your web application bin directory to make it working.


Turns out it was somehow related to the firewall. Worked fine bypassing the firewall. Passed to sysAdmin to sort out.

Wednesday, March 21, 2012

Writing a CustomScriptManager

So, I know how to do some of the required code for a "CustomScriptManager", like I postedhere. But there are still some issues that I'm trying to solve, like:

Need to be able to have a corresponding javascript behavior which is automatically referenced on the page (matches the ExtenderControlBase scenario). I assume this has something to do with the EnsureScripts internal method and the various helper methods included in the ScriptReferenceHelper class. I attempted to copy the ScriptReferenceHelper code, but it just wouldn't build.

I also need to be able to use the [RequiredScript] property, again this probably has something to do with the EnsureScripts() mentioned above.

I don't want to use the ExtenderControlBase, because I'm not "extending" anything. I did try it, and just have no properties, but I lose the ability to generate the <customScriptManager id="cManager1" /> in the xml-script.

Any suggestions?

If you would like to write a custom ScriptManager,try to take a look at this reading about asp:ScriptManager to get some ideas.
http://ajax.asp.net/docs/mref/3b24af40-d9f2-7ddd-cb8e-38a9bb90b9c6.aspx
I don't think it is necessary to write a custom ScriptManager if you have installed Ajax framework in your PC.asp:ScriptManager is suitable to most of your development work based on Ajax framework.
Wish this can help you.

Writing a gadget i C#.NET

I've tried to find a tutorial for this for quite a while, but all sites, including the Gadget SDK, links to this page: http://ajax.asp.net/docs/Walkthroughs/DevScenarios/gadget.aspx

That page cannot be found. Is it moved somewhere else, or is it old and not supported anymore?

Here are a few links I found:

Building a Simple Gadget for Live.com

Microsoft Gadgets site

Writing a new Behavior

Writing a new Behavior

hello.

It looks like there was a problem with your post...what are you after?


I cancelled out of this post before submitting.

Writing Ajax Rating to DB

Hi

Well Heres what I want to happen


1. User rates page via rating control, selecting 1- 5

2. 1,2,3,4,5 get stored in a DB

3. The top five pages with the most votes (highest number), a link gets displayed to the web page on the home page

http://www.codeproject.com do something almost identical to this, but the one thing I dont understand is that the website will have around 1k of pages, therefore wont this be really slow?

Thanks

If the database tables are indexed properly then a few thousand records in a table will run very quickly.

In your other post on this (http://forums.asp.net/t/1128872.aspx) I included a script you could run on SQLExpress, this should run find with 1k of pages and 5-10k of ratings.


Thanks for that, I havent got that far yet, as I am having some trouble intergrating ajax into an existing asp.net app. That script looks great though!


Richard Line,

Well done.Big Smile

Writing first extender control

Hi,

I am writing my first extender control to populate a text box with some value on click event of button. But I am missing something hence the extendercontrol is not gettting instanitated and also inserting debugger doesn't break into it. Can someone please help here?

Here is the code:

JS:


Type.registerNamespace('Toolkit');

Toolkit.DisableButtonBehavior = function(element) {
Toolkit.DisableButtonBehavior.initializeBase(this, [element]);
this._button = null;
this._textBox1 = null;
}

Toolkit.DisableButtonBehavior.prototype = {
initialize : function() {
/// <summary>
/// Initialize the behavior
/// </summary>
debugger;
this._button = this.get_element();
Toolkit.DisableButtonBehavior.callBaseMethod(this, 'initialize');
this._clickHandler = Function.createDelegate(this, this._onClick);
$addHandler(this._button, "click", this._clickHandler);
this._AlertHeader();
},

dispose : function() {
/// <summary>
/// Dispose the behavior
/// </summary>
Toolkit.DisableButtonBehavior.callBaseMethod(this, 'dispose');
},

_onClick : function() {
this._AlertHeader();
},

get_TextBox1 : function() {
return this._textBox1;
},
set_TextBox1 : function(value) {
debugger;
this._textBox1 = value;
},
_AlertHeader : function () {
this._textBox1.value = 'test5';
}
}

Toolkit.DisableButtonBehavior.registerClass('Toolkit.DisableButtonBehavior', AjaxControlToolkit.BehaviorBase);


if( Sys && Sys.Application ){
Sys.Application.notifyScriptLoaded();
}

Extender Class:

using System;
using System.Web.UI.WebControls;
using System.Web.UI;
using System.ComponentModel;
using System.ComponentModel.Design;
using AjaxControlToolkit;

[assembly: System.Web.UI.WebResource("Toolkit.DisableButtonExtender.DisableButtonBehavior.js", "text/javascript")]

namespace Toolkit
{
[ClientScriptResource("Toolkit.DisableButtonBehavior", "Toolkit.DisableButtonExtender.DisableButtonBehavior.js")]
[TargetControlType(typeof(Control))]
public class DisableButtonExtender : ExtenderControlBase
{
[IDReferenceProperty(typeof(Control))]
[DefaultValue("")]
[ExtenderControlProperty]
[ElementReference()]
public string TextBox1
{
get { return GetPropertyValue("TextBox1", ""); }
set { SetPropertyValue("TextBox1", value); }
}
}
}

ASPX:

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="Testpage.aspx.cs" Inherits="Testpage" %>
<%@dotnet.itags.org. Register Assembly="Toolkit" Namespace="Toolkit" TagPrefix="toolkit" %
<!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>
</head>
<body>
<asp:ScriptManager ID="scriptmanager" runat="server"></asp:ScriptManager>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<asp:Button ID="Button1" runat="server" Text="Button"/>

</div>
</form>
<toolkit:DisableButtonExtender ID="DisableButtonExtender" runat="server" TargetControlID="Button1" TextBox1="TextBox1"></toolkit:DisableButtonExtender>
</body>
</html>

Thanks

Hi,

The only problem I can find in your code is that the ScriptManager and the Extender are placed out of the form. When I modified this and run, it worked fine.

I created a ClassLibrary project, then added the following code into it:

using System;using System.Web.UI.WebControls;using System.Web.UI;using System.ComponentModel;using System.ComponentModel.Design;using AjaxControlToolkit;[assembly: System.Web.UI.WebResource("ClassLibrary1.DisableButtonBehavior.js","text/javascript")]namespace Toolkit{ [ClientScriptResource("ClassLibrary1.DisableButtonBehavior","ClassLibrary1.DisableButtonBehavior.js")] [TargetControlType(typeof(Control))]public class DisableButtonExtender : ExtenderControlBase { [IDReferenceProperty(typeof(Control))] [DefaultValue("")] [ExtenderControlProperty] [ElementReference()]public string TextBox1 {get {return GetPropertyValue("TextBox1",""); }set { SetPropertyValue("TextBox1",value); } } }}

This js file is set as EmbededResources

Type.registerNamespace('ClassLibrary1');ClassLibrary1.DisableButtonBehavior = function(element) { ClassLibrary1.DisableButtonBehavior.initializeBase(this, [element]); this._button = null; this._textBox1 = null;}ClassLibrary1.DisableButtonBehavior.prototype = { initialize : function() { /// <summary> /// Initialize the behavior /// </summary> debugger; this._button = this.get_element(); ClassLibrary1.DisableButtonBehavior.callBaseMethod(this, 'initialize'); this._clickHandler = Function.createDelegate(this, this._onClick); $addHandler(this._button, "click", this._clickHandler); this._AlertHeader(); }, dispose : function() { /// <summary> /// Dispose the behavior /// </summary> ClassLibrary1.DisableButtonBehavior.callBaseMethod(this, 'dispose'); }, _onClick : function() { this._AlertHeader(); }, get_TextBox1 : function() { return this._textBox1; }, set_TextBox1 : function(value) { debugger; this._textBox1 = value; }, _AlertHeader : function () { this._textBox1.value = 'test5'; }}ClassLibrary1.DisableButtonBehavior.registerClass('ClassLibrary1.DisableButtonBehavior', AjaxControlToolkit.BehaviorBase); if( Sys && Sys.Application ){ Sys.Application.notifyScriptLoaded();}

Then used the following page to test it and it worked fine:

<%@. Page Language="C#" %><%@. Register Namespace="Toolkit" Assembly="ClassLibrary1" TagPrefix="toolkit" %><!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 id="Head1" runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="scriptmanager" runat="server"></asp:ScriptManager> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <br /> <asp:Button ID="Button1" runat="server" Text="Button"/> <toolkit:DisableButtonExtender ID="DisableButtonExtender" runat="server" TargetControlID="Button1" TextBox1="TextBox1"></toolkit:DisableButtonExtender> </div> </form> </body></html>

Thanks Raymond. Getting script manager within form tag worked.


Writing Games in ASP.NET AJAX

Hi All,

I was curious about usingAnimation behaviors in the toolkit to create games, but I found that they came up a bit short for this kind of task. So I wrote some behaviors and control extenders to allow sprite animation, collision detection, and some other fun stuff.

If you're interested in trying out this first version please check out thisblog post andproject page.

AndyBeaulieu:

Hi All,

I was curious about usingAnimation behaviors in the toolkit to create games, but I found that they came up a bit short for this kind of task. So I wrote some behaviors and control extenders to allow sprite animation, collision detection, and some other fun stuff.

If you're interested in trying out this first version please check out thisblog post andproject page.

That is so COOL! I am so trying this out... wonder if my bosses would let me put a shoot the fish game in our Government Applications.. you know... incase the customers get bored... could always bring back the amazing "Boss Key" :D

Writing Javascript at Runtime on Update

Ok, I can't seem to find a shred of working advice on this topic. But, here are the basics.

Button inside of an updatepanel. Partial rendering is turned on.

Button gets clicked. Ajax call is made to the server. How do I at this point write javascript to the client's box that will execute, such as an alert.

Can't use Response.Write. Can't use ClientScript.Register... since that requires a full postback, unless I'm missing something. So...I'm not really sure what my other options are, surely someone else has run across this already. If you have any insight please share it with me.

Use EVAL() function of Javascript. It can be used as following,

<SCRIPT language="Javascript">

function Popup()

{

ExecJavascript("alert('Hi All');");

}

function ExecJavascript(var jscript);

{

eval(jscript);

}

</SCRIPT>


Use ScriptManager.RegisterStartupScript. Here's a working example:

<%@. Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> private void button_click(object sender, EventArgs e) { ScriptManager.RegisterStartupScript(up1, up1.GetType(), "myscript", "alert('Alert sent from server!')", true); }</script><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:UpdatePanel ID="up1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Button ID="button1" runat="server" Text="Click Me" OnClick="button_click" /> </ContentTemplate> </asp:UpdatePanel> </form></body></html>

hello.

or, if you don't need to return anything from the server, you can also hande the endrequest event of the client pagerequestmanager object which is available in all the pages that have updatepanels.

<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_endRequest( endRequest );

function endRequest( sender, e ) {
//put your code here.
}
</script


Perhaps I was not clear.

madesh, Your code is only from javascript to javascript. That isn't the issue.

Steve Marx, You don't have partial rendering enabled. You will find that enabling that will prevent your button from registering that script block because doing that requires a full post back.

Luis Abreu, I do need to send info back from the server.

Let me restate the problem. You're on the server, there isn't any javascript already on the client. You need to write some JS to the client, from a partial postback. ie, they just pressed the button, but it was through AJAX which means no script registering through the ClientScript object. So, during this partial post back, what are my options for sending a script block to the client?


Crap miss-read that Steve, I haven't tried it with the script manager, ill give that a shot when i get home. Why can't we edit posts?...


Excellent. Thanks Steve it worked. The trick is, you can't use Page as the control to register the script with. You have to use an existing control on the page, any will do. Even the update panel (up1). Thanks.

ZeroDegrez:

madesh, Your code is only from javascript to javascript. That isn't the issue.

Let me restate the problem. You're on the server, there isn't any javascript already on the client. You need to write some JS to the client, from a partial postback. ie, they just pressed the button, but it was through AJAX which means no script registering through the ClientScript object. So, during this partial post back, what are my options for sending a script block to the client?

As you stated that it is a AJAX call and Javascript gets generated on server side. EVAL can help you. Return your server generated Javascript to Client side as a string(Output of your AJAX call). Execute that Javascript on Client side using EVAL function.

This way you can execute the javascript returned by your AJAX call on client side.

<SCRIPT language="Javascript">

function AJAXcall()

{

var JScript={Put your AJAX call here};

ExecJScript(JScript);

}

function ExecJScript(var JScript)

{

eval(JScript);

}

</SCRIPT>

writing json back to client

I am making an xmlhttp request (using the scripts provided inAjax for Web Application Developersby Kris Hadlock) to get data from an aspx page. When I create a dataset and return xml with an xmldocument it works fine. I am using the following where dsreturn is the getXML of the dataset.

Dim xdocAs XmlDocument =New XmlDocument()

xdoc.LoadXml(dsreturn)

xdoc.Save(Response.OutputStream)

The problem is that I also want to return json. I have created a biz class to parse a dataset and return a json string. I know this works because I have used it in other web services. When I do this I get nothing. I think that my problem is how to return the json string in the response.outputstream. I am not sure how to do this. Just using response.write doesnt seem to work.

Thanx

Have you considered using page methods instead of doing it all by hand? They return JSON by default.

Writing Javascript in Usercontrol

Hi All,

My UserControl is having some linkbuttons. Whenever i click those linkbutton i need to show and hide some 'div' elements on the page on which im placing the usecontrol. What im doing is.

Code in LinkButton of UserControl

string scriptBlock ="";

scriptBlock +="<script language='javascript' src='/system/Js/changeclass.js'>";

scriptBlock +="hidecontent123();"; // Here "hidecontent123 is the function that which im calling from the source file 'changeclass.js'.

scriptBlock +="</script>";

Page.ClientScript.RegisterClientScriptBlock(this.GetType(),"doSomething", scriptBlock);

hidecontent123() function:

function hidecontent123()

{

document.getElementById('previsible3').className='hidden';

}

Now im placing this UserControl in the webpage. In this page im having the 'div' tag with id 'previsible3', that which im hiding using the javascript function. First of all its not even going in to the function 'hidecontent123()'.

With the above code im not able hide the 'div' tag that which i want. Can anyone plz help me out in this.

Thanks in Advance,

Rajak Shaik.

I can't see where you're adding the Javascript call to the LinkButton.

LinkButton1.Attributes("onclick") = "hidecontent123()"

Presumably 'hidden' is a CSS class with 'display:none;' or similar? In your function you could do this:

document.getElementById('previsible3').style.display = 'none';

Bear in mind that the rendered ID of your element will change in a user control, so you could add the ClientID to you function:

LinkButton1.Attributes("onclick") = "hidecontent123('" & previsible3.ClientID & "')"

Then:

function hidecontent123(theDiv)
{
document.getElementById(theDiv).style.display = 'none';
}

Also bear in mind that changes like these will not be persisted across postback.

(code untested!)


Forgot to mention, the LinkButton will cause a postback unless you prevent it. If it posts back, your changes (hiding the div) will be lost unless you save the current value(s) to a hidden field that can be accessed server-side.

To prevent postback:

LinkButton1.Attributes("onclick") = "return hidecontent123('" & previsible3.ClientID & "')"

function hidecontent123(theDiv)
{
document.getElementById(theDiv).style.display = 'none';
return false;
}

Writing New Control - WebResource Url Throwing Exception

Hey Everyone,

I'm having a really hard time with this one. I recently upgraded to lateest control toolkit, and now i can't use my custom controls. I get the dreaded unrecognized tag error.

When I try to load the webresource.axd url for the javascript, I'm getting the following error:

WebResource.axd?d=_IYF6c389WdEZP8BREten0VCyRTYFXUFn9GR9MRXP-aoOJ5cYUZwsxAz4rdBOPaz6CoHQyUbH48-Kn0gv5WhhCj2yI8nUNAt-hz-wRrJAwI76fBROssmxDJplsNW85vw0&t=632907313964152042

Specified argument was out of the range of valid values.
Parameter name: offset

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: offset

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: offset]
System.Web.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 count) +3153595
Microsoft.Web.Services.WebResourceCompressionModule.OnPreRequestHandlerExecute(Object sender, EventArgs e) +1103
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


any ideas?For some reason, the Atlas Control Extender template doesn't make the Behavior.js an embedded resource. Change that in the properties pane and rebuild.
yeah, i saw that in the FAQ, and made sure (and double sure) that it was marked as an embedded resource. and it looks like it is, because i am seeing the resource in the source. it's when the browser tries to read the resource that .NET is throwing that funky WebResourceCompressionModule error...
So using a tool like Fiddler, the js file is being sent across?? Hmmm.
I actually saw this yesterday when I was doing some work but (unfortunately) I didn't ever figure it out, mostly because it kind of magically went a way. I think I rebuilt everything clean and it started working.