AJAX :: RegisterScriptDescriptors Creating Two Add_init Calls?

Mar 21, 2011

When I view the source of the generated HTML page I see two add_init call being generated by the RegisterScriptDescriptors call in my custom AJAX control. When I removed the register line it doesn't generate any add_init method calls. Here are the PreRender and Render methods since they seem to be the one's driving the creation.

[Code]....

View 1 Replies


Similar Messages:

AJAX :: Sys.Application.add_init - Explore Two Functions?

Mar 31, 2011

i seen fucntion for javasctipt several times like Sys.Application.add_init,Sys.Webform.PagerequestManager etc. i alredy understandind that two functions.but i like to explore more functions like that. is that Jquery functions or some thing else?can some one send me list of functions?

View 2 Replies

Calls To Successive Calls On Repeater With XML Datasource Is Not Binding New Data?

Feb 17, 2010

I have the following Page_Load function...

protected void Page_Load(object sender, EventArgs e)
{
XmlDataSource1.Data = GetXmlFromFile(Request.QueryString["file"]);
XmlDataSource1.DataBind();
Repeater1.DataBind();
}

The page in which this Page_Load resides is called by a parent page. Each time this Page_Load gets called the value of "file" in the query string will be different. So each time I will be receiving the XML contents from a different file which are inserted into the XmlDataSource and then bound against by the Repeater. Getting the XML data from the file works great but when I bind against the repeater that only works the first time through Page_Load. Each time after that when this code is executed the same results from the first XML file are displayed in the repeater.

What am I missing here. How can I get the XML data to be bound against the repeater on each page load instead of just the first one?

View 3 Replies

Multiple Webservice Calls / Some Of Its Calls Are Duplicated (with Difference Of Milliseconds)

May 10, 2010

I have a webservice (ASP.NET) deployed on a webfarm. A client application consumes it on daily basis. The problem is that some of its calls are duplicated (with difference of milliseconds). For example I have a function Foo(string a,string b). The client app calls this webmethod as Foo('test1','test2') once but my log shows that it is being called twice or sometimes 3 or 4 times randomly. Is this anything wrong with the webfarm or the code? Note that the webmethod has simple straighfarward insert and update statements.

View 1 Replies

Know When All AJAX Calls Ended?

Feb 24, 2010

I have an ASP page, which on load fires a bunch of AJAX calls. How can I detect in javascript that all AJAX calls finished? The ajax calls are made using AJAXPRO library. I need this in order to execute some event.

View 1 Replies

AJAX :: PageMethods Calls Inconsistent?

Jun 14, 2010

Ran into a bit of problem when using PageMethods when calling a webmethod in the code-behind. My markup page has a radgrid which gets populated via the objectdatasource.Pagemethods works and returns data as expected when the objectdatasource binds the radgrid with some data but not when the objectdatasource returns nothing, i.e. radgrid is empty. PageMethods call has got nothing to do with the objectdatasource, I'm simply using its output to build a list of checkboxes dynamically on the client side using Javascript. And this is how my code snippets looks like:Markup page:

<script type="text/javascript">
function CallGetARInvoices(src,dest)
{

[code]...

View 1 Replies

AJAX :: Asynchronous Calls To Same Method?

Mar 12, 2010

I am relatively new to asp.net. In My asp.net website, i have a method GetData(int id) which is called Repetitively, depending on id count, GetData is desinged to get data from sharepoint and sql server both. if the Id count is high say =10, my page load time increases because GetData is called 10 times and the page load time keeps adding up. so I want to ask, is there any way that this GetData() be called asynchornously or by the use of some thread, so that my page loads faster.

View 2 Replies

AJAX :: Use Asyncronous Calls To The Database?

Jan 20, 2010

I have a few update panels on a page and when Timer ticks they each make a call to the database. With their being 8 panels it was taking some time to refresh the page, so I decided to use asyncronous calls to the database. Here is a sample call:

//Create an instance of the DataAccess class
dataAccess = new
DataAccess(); [code]...

Prior to using the callback method it all worked fine (though it did take a while to first load the page). Now, even though the methods are called, the labels are not being updated.I have added Async="true"to the page directive but that doesn't help.Does anyone know a way to make the information show on the page when the EndGetDataSet method is invoked?(DataAccess is a small class I created to enable creation of DataSets and it takes a Hashtable containing SQlParameters as an argument).

View 1 Replies

Multiple Ajax Calls From Same Page

Aug 31, 2014

on my page I've to check if the UserName is available and sponsor code is correct. For that I'm using ajax call for both.

Code:
Sponsor User Name   <span id = "mesg"></span><asp:TextBox ID="txtSpUserName" runat="server" CssClass="DropText" onblur ="ShowAvailability()"></asp:TextBox>
Login Name <span id="Login"></span><asp:TextBox ID="txtLoginName" runat="server" CssClass="DropText" onblur ="ShowLoginName()"></asp:TextBox>

[code]....

Why they are not giving separate results?

View 2 Replies

How To Handle Session Timeout In Ajax Calls

Mar 8, 2011

I'm making an ajax call using jquery to an asp.net mvc controller action:

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult GetWeek(string startDay) {
var daysOfWeek = CompanyUtility.GetWeek(User.Company.Id, startDay);
return Json(daysOfWeek);
}

When session times out, this call will fail, as the User object is stored in session. I created a custom authorize attribute in order to check if session was lost and redirect to the login page.

View 2 Replies

AJAX :: Use AutoCompleteExtender Control Without Web Service Calls?

Apr 17, 2010

I am successful in using the AutoCompleteExtender control by make use of web serivces as the data source (ServiceMethod) to the extender control. My question is do we have any way in assining a code behind method as data source to this control.

removing the ServicePath url and assiging code behind method to ServiceMethod attribute will resolve the issue.

View 4 Replies

How To Server AJAX Calls Using Json With Web Forms

Mar 2, 2010

I know MVC controllers are quite good at serving JSON formatted AJAX requests, but is there any built-in ASP.NET functionality I can use for these type calls from a plain old web forms site

View 3 Replies

C# - Implementing JQuery AJAX Calls In A MVC Website

Jun 22, 2010

what is the correct way to pass data through the AJAX calls and have it be model-binded into an object inside my Controller Action?

So far, I've read in some places that jQuery sends data in key-value pairs, so I don't have to do anything extra, while in other places, I've read that I have to first use a JSON deserializer and then bind the result. I've currently implemented my Controller Actions as ones that accept HTTP POST.

View 2 Replies

Code Behind Methods Vs. Jquery AJAX Calls?

May 3, 2010

Old school coders are used to having every server control create events in the .cs files.. for example.. Getting the Initial load of data, Saving Data, Deleting data... and then binding datasources to the server control..

New school coders want to do it in Jquery + AJAX calls to .svc files... That gives automatic no post backs so that is a advantage... and I think its a different way of thinking.. All of a sudden the UI related events are all being done in Jquery..

What is the most modern and efficient way to go ? How can I convince the old school coders to let us you this new paradigm ? (assuming it is the better way)

View 3 Replies

WCF / ASMX :: Securing AJAX Calls From JQuery?

Sep 21, 2010

I am working on web application in which all of the data I am submitting back to the server is being done on the client side using JQuery AJAX calls to my .NET web services using JSON. This works perfectly to enhance my user experience and greatly reduces post backs, etc.What I am looking for suggestions on is securing the web services being exposed to the client side from being used by anything but my JQuery code on my site. The security hole that I see here is that since the client-side JQuery can access the web services, so could anything.

View 2 Replies

Ajax Calls Within <table> Tag Causing Error?

Jan 12, 2011

Ajax calls within <table> tag causing error.

htmlfile: Unknown runtime error

I am pasting here full code to produce error. Please help me to sort it out.This is my code for .aspx file. Paste it in new .aspx file inside form tag.

[Code].... And this is code behind file code. Paste it inside .aspx.cs public partial class.

[Code]....

View 5 Replies

C# - Make Jquery Ajax Calls To Page?

Nov 14, 2010

How do I go about making true ajax requests to an asp.net page? (Not update panels). I read this tutorial but couldn't get it working. Is there a better approach? Or should this work?

[URL]

View 2 Replies

AJAX :: Stop 2 Asynchronous Web Service Calls?

Nov 22, 2010

We have a custom Ajax checkbox control. In that control we set value (from inside the control) via a web service call (say WSCall1) to the business engine. There is also an event exposed on the OnClick of checkbox for the end user to have their custom code where the end user have their own web service call (say WSCall2). This event that end users will write is handled inside the ajax checkbox control on the "OnSuccess" of the internal web service call (i.e WSCall1) with an expectation that if WSCall1 succeeds, WSCall2 will get executed. This works fine with Firefox and Chrome but not in IE. In IE sometimes WSCall2 gets executed first and then WSCall1 -- actually there is no gurantee which web service gets called first. For WSCall1 we have used " Sys.Net.WebServiceProxy.invoke"

Is there a way we can make sure that WSCall2 gets only executed on the "OnSuccess" of WSCall1? Isn't the OnSuceess supposed to be executed when the WSCall1 thread returns?

View 1 Replies

How To Make Multiple But Separate AJAX Calls In JQuery

Nov 19, 2010

I am trying to make 2 separate AJAX calls using buttons. What I want to happen is: when Button1 is clicked ProductsTable shows data from the webservice; when Button2 is clicked OthersTable shows its own data from the webservice. But right now, when either button is clicked, nothing shows up. I know the code works if there's only one of them and it's not wrapped around a .click function.

No error messages. ASP.NET 4.0, JQuery 1.4.4. Not using ScriptManager. Not using UpdatePanels.

Code below:

[Code]....

View 3 Replies

AJAX :: Calls To Generate The Dynamic Controls Are Always 1 Step Behind?

Jul 1, 2010

I have 2 drop downs that control the generation of dynamic controls.

Problem is that when the async post back happens the results are giving the previous values selected in the drop downs and not the new selected value in the drop down as would be expected from a traditional postback event.

So the calls to generate the dynamic controls are always 1 step behind.

View 2 Replies

How To Save And Retrieve Cookies Using Ajax Webservice Calls

Jan 26, 2010

I have web app which stores certain things on a page in a cookie when the page posts back in case the user doesn't finish what they're doing and come back later. But now I must do a javascript time-out and actively save the info to the cookie rather than wait for the user to postback. All my cookie code is on server side where I use Response and Request objects to read and write cookies and I want to leverage that. So I would like to just use ajax calls to a webservice. Is there a way for me to access Request and Response objects and read and write cookies to the browser via those objects during a webservice call? Or should I just go with javascript?

EDIT: Sorry i wanted to specify that I would like to use jquery-ajax.

View 2 Replies

MVC :: Partial View Contains A Link That Calls An Action Via Ajax?

Nov 27, 2010

I have a view that renders a few partial views. Each partial view contains a link that calls an action via ajax. The result from the action is used to fill a div. Because I use the same partial view a few times, it always renders the div with the same id. In asp.net, we have something like naming container, that assures that each element has unique ID. How can I make IDs in a partial view unique ?

View 1 Replies

AJAX :: Asynchronous Web Services, JQuery Or .NET (BeginInvoke) Calls?

Sep 24, 2010

I have been moving my application to be more AJAX-based. Currently I have a web service call where I use jQuery to gather some textbox (string) and checkbox (boolean) results and pass it to a web service. Everything works really well, the response time is super quick. The only downside that I can see to this is

1) you need to use jQuery, which will add to the user's download time - this doesn't really affect my application too much because I am using jQuery throughout the site

2) users can see the code and potentially try to hack the web service because they know where it is

I am most concerned with #2. I've been reading a lot about .NET web service calls, using IAsyncResult,

http://msdn.microsoft.com/en-us/library/2e08f6yc.aspx, and I am beginning to understand the 4 methods available in this article. However, is there extra bloat using this way compared to the jQuery web service call?If there isn't that much bloat or lag time using this method, I'd like to convert my application. Which one of these 4 methods is best in a scenario where I am just returning a small string value? The 4 methods in the article are to wait for EndInvoke itself, which from what I read is not recommended because this may block the first thread; and this should not be used on a service that affects the UI.Create a WaitHandle to wait for the 'OK' before EndInvoke is called Poll the IAsyncResult for .IsCompleted, using sleep() and a Do While until IAsyncResult.IsCompleted is true, then call EndInvoke Pass a delegate function to BeginInvoke to be called once the operation is complete.

View 1 Replies

AJAX :: Make Calls To Page Using JavaScript And XmlHttp

Mar 24, 2014

function addToFavorites(prod, box) {
var favPage;
var response;
if (box.checked == true) {
favPage = "xyz.aspx?type=add&product=" + prod;
} else {
favPage = "xyz.aspx?type=remove&product=" + prod;

[Code] ....

I am using the above javascript to call a page on check box click.It is working fine on my visual studio project.

But when i deploy that it is not working.javascript is calling but not able to call that page.

I am using visual stuido 2008 / 3.5  as my development server.

View 1 Replies

AJAX :: JQuery - Make Calls To Multiple Web Methods?

May 7, 2015

$.ajax({
type: "POST",
url: "./InActiveMerchantList.aspx/LoadStakchart",

[Code]....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved