pagemethods

How to get the result of jQuery PageMethods function

I have posted a similar question to this problem and could answer it myself, but the solution does not fully satisfy me. Using Asp.Net/C#, I have a button which will perform some server-side code if it passes a client-side validation. I want to do it this way because for my application, I think it suits best. <asp:Button runat="server"...

AJAX call works on local machine, not on host

hey everyone, What could potentially stop an AJAX call from working on the host server, when it works fine on the local host? I tried returning an error from the AJAX call, but all I get is 'undefined'. I don't think the actual page method is being called since no information is added in my log (and I've explicitly added a call). I ca...

get value of dynamiclly created radiobuttonlist

Hi All, I'm trying to get the value of a dynamically created radiobuttonlist via javascript to call a pagemethod. This is how I'm creating the rbl: rbl.Attributes["onclick"] = "javascript:preview('" + rbl.ID + "','" + rbl.ClientID + "');"; And this is the javascript: function preview(controlid, clientid) { var r...

Callling business logic layer method from PageMethods

I've a static page method in web form application and I want to call method on private class level variable from it as shown below. I'm using jQuery to call the page method. private readonly ICatalogBLL _catalogBLL = new CatalogBLL(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { _catalogBLL.GetSomet...

PageMethods and page controls reference

I'm using pagemethods to call a method from javascript, is there a way to access the page's controls from the method in codebehind (marked as static)? The problem is that the pagemethod nedds to load a business entity and load it to the page, and the structure is complex. Thanks in advance for any help. ...

ASP.NET 4.0 - Calling a server-side method from a client side method - PageMethods

I'm trying to access a server side method from a client side one (that is just calling a server method from javascript). I'm using .NET 4.0 Visual Studio 2010 Ultimate. I'm building a web control (ascx). I have an ascx page (the control's html) and an ascx.cs page: The ascx is the following: <%@ Control Language="C#" AutoEventWireup="tr...

Creating a clicked event on ascx control when pressed

Hello! I have a question about creating and managing events inside an ascx custom web control. I have created a very stupid control consisting in a div containing a asp:Label control, it is a very simple structure: <div id="mydiv" runat="server"> <asp:Label id="mylabel" text="Text"... /> </div> That is, very simple. I would like...

page method multiple call backs

Hi all, im calling page method on mouse over of image slider to show image from database. The problem is i'm getting multiple call backs. So does any one have idea on resolving this issue. Thanks, Mehul Makwana. Code which i'm using for page method. var contextArray = "img"; pageMethodConcept = { callServerSideMethod: fun...

Get User Spent Time onunload In Asp.Net and javascript

Hi, I need to get the time every user spent on the page and insert that information to database. When the page loads I assign a start time to a javascript value. on body's onunload function I calculate the time difference between the start time and end time so that I can insert it to database. I use script manager and EnablePageMethods...

Does BlogEngine.Net have a custom HttpHandler for all .aspx requests?

I'm working on customizing BlogEngine.Net to be able to return some HTML from an AJAX call. Basically I'd like to render a UserControl server-side and then return the resulting HTML to a client-side call. I've done this many times in other applications using static PageMethods marked with the [WebMethod] attribute. But any time I try th...

.net 2.0 ajax jquery pagemethod 404 object not found

in my master page, i have <head> <script type="text/javascript"> $(document).ready(function() { $("#result").click(function() { $.ajax({type: "POST",url: "ws.aspx/HelloWorld",data: "{}",contentType: "application/json; charset=utf-8",dataType: "json",success: function(msg) { $("#result").text(msg.d); } }); }); </script> </head> <body> <f...

Difference between vs development server and IIS Server

I am develop a website,which using PageMethods, in vs development server, it can fire, but not in local iis server(got 500 error and timeout in firebug),how do i debug? this is a popup window, in call, i get the parent window's url,use pagemethod to get calling number by url, the fire call. <script type="text/javascript"> function c...

PageMethod reload page

Hello I call static PageMethod from JS. PageMethod send some information to emails. When I call it, page reloads. How should i prevent reloading page during PageMethod and do it at ajax style? Thanks. ...

How to pass page or master page object to AJAX page method

I wrote a page Page method in my aspx page. in web service method I need to call FindControl method return textbox and get text box value. But my findControl will take MasterPage object to iterate. Please see my code <script type = "text/javascript"> function ShowCurrentDateTime() { $.ajax({ type: "POST", ...

How to get control values and modify them in Page Methods?

I have couple of controls in the page. I need to modify these value in Page method. How can I do that?. When I modify those values in page method should reflect in page? Please give me expample. ...

Framework Similar to ASP.Net AjaxPro

Currently, I'm using AjaxPro Framework (http://www.ajaxpro.info/) to call any methods in my web application from the client side. But users have some serious problems using it. (e.g success callbacks don't work in Chrome. More info about the problems could be found at: http://stackoverflow.com/questions/529711/ajaxpro-is-working-locally-...

ASP.NET PageMethods - Back Button Causing 'Authentication Required' Prompt

Since last week I've had a really odd issue with PageMethods and the back button which i've never seen before. Essentially, I have a 'home page' which on document.ready (using jQuery), loads some data through PageMethods, and then renders a list - from which you can click through to a details page about the item. In general use, it wor...

Asp.net: save data entry form with PageMethods

The problem: I have a data entry form. I would like to save the data without page roundtrip or UpdatePanels. The solution: - the 'Save' button calls a javascript function which serialize all the fields content (client side) - the javascript function calls a web method (server side) - the web method deserialize the data and save it to t...