Using ATLAS without using Web Services

1. Is it possible to use ATLAS by some way so that we dont need to create any web services.
2. is their any way to create a dummy page on the server and put all the functions into it, which we need to call through ajax on server side and then call those pages with some kind of query parameter so that it can understand which method or function need to be called and thus returns the result asynchronously.

thanks and regards
goru
0
goru
3/10/2006 1:38:42 PM
asp.net.ajax-discussion 13973 articles. 1 followers. Follow

10 Replies
871 Views

Similar Articles

[PageSpeed] 53

1. Absolutely, though you'll find your self writing a lot more javascript, one way to do it is using the objects/functions defined in the AtlasRuntime.js, which act as a wrapper to the XmlHttpRequest object. Here's an example:

    function buttonClick() {
        var request = new Web.Net.WebRequest();
        request.set_url("MyAtlasHandler.ashx");
        request.completed.add(this.onCompleted);
        request.invoke();
    }
   
    function onCompleted(response) {
        alert(response.get_response().get_data());
    }

2. I would use an HTTP handler (.ashx) instead of a page for this.

0
yortch
3/10/2006 2:03:02 PM
To answer your first question, have a server side method labelled with
"[WebMethod]" and make sure you have "using System.Web.Services;"
declared.

Therefore, you can call a method in your code behind for example.

0
Inventisity
3/10/2006 2:08:03 PM

Hi,

I'd like to know if there is an intention to provide an inbuilt framework for the use of Webhandler or HTTP handler files (.ashx files) in ATLAS. Although web services are great, it seems superfluous to force users to create an extra web service just to use the ATLAS components' server side processing capabilities. Web services also introduce added complications into development such as security issues. Webhandlers enable data operations to be performed as an integral part of the existing website.

 


Rgds,
Dragonman
0
Dragonman
5/22/2006 1:48:45 PM
Can you show us an example of what you're referring to with this "WebMethod"?  Or... is there an example that you have seen that you may be able to point us to?
0
mbroaddus
5/22/2006 3:24:47 PM

Aha, I've discovered the very useful option of being able to leave out the ServicePath value which can then use Sys.Net.PageMethod.invoke and invoke the specified method on the current page instead of Sys.Net.ServiceMethod.invoke which requires an existing webservice. Great!


Rgds,
Dragonman
0
Dragonman
5/25/2006 9:29:44 AM
Oh boy, well it's great until one realises that using the page instead of web service option will post the entire form contents back to the page and build the control tree, etc. on every asynchronous call. Doesn't this defeat the purpose of Ajax? I go back to my original (it seems) rhetorical question whether there will be support for Webhandler pages.
Rgds,
Dragonman
0
Dragonman
5/26/2006 9:58:26 AM

Hi mbroaddus,
Please take a look at the HelloWorld sample (slides 16-17) in this PDF:
http://www.pghtech.org/networks/informationsystems/files/dot.net/atlas-codecamp.pdf

0
yortch
5/26/2006 12:11:39 PM

Dragonman,
You're right about the "posting to the page" option, will build the control tree. Remember that the AJAX request is merely a HTTP POST operation, so the web server has no way of knowing wether this is an AJAX request. However in some cases, this is exactly what you want to do, i.e. if you need to access values from other controls, I think you'll find this "feature" very handy. If you don't need this and/or if your control tree is huge, stay away from this approach and rely on web handlers or web services posts.
ASP .NET 2.0 callbacks are implemented using a similar approach to the "posting to the page" option, they provide a Page.IsCallBack property that allows you to detect if the request is from a call back (i.e. XmlHttpRequest), however the control tree is loaded to the PageLoad event so I'm not sure you'll be able to prevent loading the control tree if events upper in the stack.

0
yortch
5/26/2006 12:18:50 PM

Just wanted to update this example as it doesn't work with the latest(Nov '06) release.
The following is the latest way:

    function buttonClick() {
        var request = new Sys.Net.WebRequest();
        request.set_url(link);
        request.add_completed(OnSucceeded);
        request.invoke();
    }
   
    function onCompleted(response) {
        alert(response.get_responseData());
    }

 


To know, is to know that you know nothing.(Confucius)
0
wojan
11/26/2006 12:13:01 AM

Actually, I would recommend wrapping this as an object as shown below.
Please note this puts an additional rndm variable on the end of the url string.
IE has a nasty habit of caching the results of a page with the same url.
This is to bypass that so that you always get the most current page.

function AJAX()
{
  this.call=function(url, callBack)
  {
    var rndm=url.indexOf('?')==-1?'?rndm=':'&rndm=';
    url+=rndm+new Date().getTime();
    var request = new Sys.Net.WebRequest();
    request.set_url(url);
    if(callBack!=null)
      request.add_completed(callBack);
    request.invoke();
  }
}
var ajax = new AJAX();


//Example:
<script>
function myCallBack()
{
  alert(response.get_responseData());
}
ajax.call('http://blahblah.com', myCallBack);
</script>


To know, is to know that you know nothing.(Confucius)
0
wojan
11/26/2006 1:22:29 AM
Reply:

Similar Artilces:

Consuming Web service from .net 3.5 web application using ajax
Hi , Before in .net 2005 ,I use to consume the  web service from client side via Ajax and java script. that's just adding web service inside the script manger services.But  it was not possible with .net 2008 version WEB APPLICATION   , Even it works well with .net 2008 web sites. Please help me to solve the issue. I have no idea what you mean. Please post the code that "does not work". NC...   I have the same problem.  I have a .NET 3.5 Web Application not Web Site.  I fully qualify the web service with the namespace i,e,  &n...

how i use ajax in web application without using ajaxtoolkit?
Hello, to every one i m new in ajax, plz help meso plz tell me how i start ajax in .net without using ajaxtoolkit or dlls Thankx in advanced Regardz ParhiyarThe best and most important Thing in this world is to help others so that then GOD Helps u!! So keep help Others!!!!! you dont need the controltoolkit.... that is just a set of pre-packaged controls for usage. You could do the exact same thing that any one of them does with just the native Asp controls and the Ajax extentions.... http://www.asp.net/learn/ajax-videos/video-75.aspx  Improve Your Coding StandardsRules to Succ...

Cannot call a web service from java script using ajax in .net 3.5 web applications
As like 2005 .net websites i tried to consume a web service from client side java script  using Ajax script manager in  .net 3.5 (2008) version web application it was not working, Event it works with 3.5 web sites, What i have to do to solve the issue. Thanks in advance Hi, can you create the least amount of code to reproduce it and post it? This gives us the ability to check out your code and better guide you. Also please check out this article: Create a Simple WCF Web Service and Use In JavaScript With Visual Studio 2008 and .Net 3.5.  Grz, Kris.Read my blog. Handy Fire...

web service call failed: 500 using ajax hovermenu and web service with ascx file
I am using a hovermenu extender on an image button. The hovemenu extender calls a web service and returns back information that I write to the panel that displays. A portion of the code is below. This works when the Page is an aspx page but when I move it to an ascx page I get web service call failed. I do have the ascx page in a folder called controls/pages off of the root but both the default.aspx page and the bedinfo.asmx page are on the root. I don't think I have a path problem. I can include more complete code, there are actually 50 images with 50 hovermenu extenders and one p...

'web service call failed: 500' using ajax hovermenu and web service
Hi there, I'm using a hovermenuextender attached to a templatefield of a gridview, and everything seemed to work fine.. however I've moved on to add dynamic attributes to the hovermenu. Now I get the error "web service call failed: 500" in place of the output I want (on the hovermenu's panel). When accessing the web service I created (directly through the browser) everything works fine.. here's my hovermenuextender dynamic attributes DynamicContextKey='<%=eval("refnumber") %>' DynamicServiceMethod="GetS...

Need help with deciding to use or not to use web services in a web application
Hi all, I haven't used web services at all in my web application development and now I was asked to use web services in my web application.  I was a novice in ASP.NET since I'm just changed to ASP.NET from a Java background. I used the tutorial on MSDN to create the DAL (which is a .xsd file type) and the BLL layers and it works pretty well for what the web application suppose to be but since I was asked to add a web service layer to this, I wonder how to do it?  And I wonder if it is necessary to have an additional layer?  What is the pros and cons for adding the we...

To use or not to use (web services / EAServer)
We (TSD) are developing client/server applications with PB for many years now (starting with PB 3.x). Now we are using PB 8.03 with ASA 8.02. In our PB applications we do have some business objects in seperate libraries. They consist of a datastore with a lot of functions. Functions do sometimes call visible objects. The last few years we see that users are more and more asking for Internet and PDA solutions. To prevent double source codes we like to have the same objects/functions for the 'old' client/server information and for the internet and PDA solutions. In our opi...

Synchronous use of a web service is useful?
I was curious if a web service adds any value when its called 'synchronously' from an ASP.Net application. Both the web service and ASP.Net application are within an enterprise's internal network and on separate web servers. I would think the web service would add no value, but  instead lower the performance in above scenario. True or false?sun21170 Yes.I agree with you. It seems that the only time when a 'synchronous' web service would provide value is when one or both of the following features are needed:n-tier architecture needs to implemented. n-tier developm...

When should you use web services and when should you use ObjectDataSource?
I am unclear as to when it would make sense to encapsulate your database queries in a web service and when you would choose to use an ObjectDataSource control? I have an app that uses a web page to display data from an sql server 2005 database. Up until now I have been using an SqlDatasource with in-line sql queries. This is very direct and clear interms of binding and dta column names and feeding parameters into the datasource queries. However, in my attempts to align with larger scale implementations I thought it was sensible to consider web services and data access layers. However, I am...

can we deploy RDL files into report server without using web services through .Net
how can we deploy the reports into report server with out using web services from .Net. Is it possible. Hi vidyaIt is possible, after the initial deployment and folders were created. You could do the following:Browse to your reportserver. Normally [server]/reportsBrowse to the report and click on it. Select the report's 'Properities' Tab. Under the heading 'Report Definition' are 2 options 'Edit' and 'Update'. Use the 'Update' to upload the new rdl file. This will deploy a new version.Hope this helps,l0n3i200n Hi folks,             ...

Using atlas or ajax on a non-Atlas web project
Is it possible to use the atlas controls, etc without setting up an atlas project?  I downloaded the atlas control kit, etc and was able to successfully create the demo/tutorial atlas web sites. However, when i try to modify an existing ASp.NET 2.0 web project by adding atlas controls, it does not work. I noticed the web config file for my atlas project had atlas entries ( i.e sectionGroup and microsoft.web sections). However, my regular ASP.NET web project does not have those sections and i was unable to add them.   What does one have to do to modify an existing ASP.NET ...

How do I use an ajax indicator without using and updatepanel?
Hi, I have an onclick event that calls a javascript function that calls a webservice via ajax (the webservice has the [ScriptService] attribute.) How can I have an ajax indicator without using the updatepanel.  Nothing so far has required the updatepanel.  I tried a simple visible and then hidden style, but it isn't working. Thank you for any help.  Add the indicator (an animated gif? or some text) to a div which is absolutely positioned has z-index set and also has id, like:<div id="progress" style="position: absolute; left: 100px; top: 100px; width:...

How to use Struct in Web Services using VS2005
Hi All, I am developing a web service which recieves the information from the client application and will store those on the SQL Server database. For this purpose, I would like to use C#.Net "struct". This is not visible from the client application. My question is how to make this struct as visible for client application. Please Help me. Code: public class Service : System.Web.Services.WebService {public Service () { [WebMethod]public string sampleMethod() {return "Sample Text"; } public struct testStruct {public string strOne;public string strTwo; } ...

Samples of using ajax without using toolkit
Hi,           I am new to asp.net. Anyone please give me some samples or examples of ajax by using callbacks without using toolkit and without database.  Please reply soon...   Thanks In Advance <asp:Label id="Time" runat="server"></asp:Label><asp:ScriptManager id="sm1" runat="server"></asp:ScriptManager> <asp:UpdatePanel>    <ContentTemplate>        <asp:Button id="Button" runat="server&q...

Web resources about - Using ATLAS without using Web Services - asp.net.ajax-discussion

Public Broadcasting Service - Wikipedia, the free encyclopedia
... such as PBS NewsHour , Masterpiece , and Frontline . Since the mid-2000s, Roper polls commissioned by PBS have consistently placed the service ...

Customer service helps bakery find recipe for success. - AdelaideNow Search Search
PUTTING the customer first has been a key to the success of Bryce’s Bakery in Elizabeth, owner Ben Pacillo says.

Car crashes into BP service station in Belfield, causing major gas leak - DailyTelegraph Search Search ...
THE family petrol station owners almost killed by an out-of-control car say a “saint was watching over” them.

Customer service helps bakery find recipe for success
PUTTING the customer first has been a key to the success of Bryce’s Bakery in Elizabeth, owner Ben Pacillo says.

Terrifying crash at Sydney service station caught on camera
Three men were injured and one woman narrowly escaped injury after a car crashed into a service station on Saturday night.&nbsp;

Apple axes free iTunes Radio service, directs listeners to Beats 1 instead
... Clint Ecker) In an e-mail sent to users late Friday , Apple announced that it would be shutting down its ad-free iTunes Radio streaming service ...

Maryland groups expect big turnout at Martin Luther King Jr. Day service activities
On the eve of President Barack Obama 's first inauguration &amp;mdash; Martin Luther King Jr. Day 2009 &amp;mdash; he asked Americans to honor ...

Producer Prices Decline More Than Expected, Services Disappoint; Oil Approaches $29
... did rise, but only 0.1 percent while the year-on-year rate is down 2 tenths in the month to only plus 0.3 percent. The ex-gas ex-food ex-services ...

Say goodbye to iTunes Radio — Apple's folding it into its $10 music streaming service
Apple's clearing the way for its new-ish Beats 1 radio station by making its older free streaming option, iTunes Radio, part of its $10 Apple ...

Anxious bride shares special moment with service dog
Service dog named Bella seen helping bride with pre-wedding jitters in viral photo

Resources last updated: 1/18/2016 6:22:22 AM