473,386 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

call webmethod masterpage

Dear All,

I have try to call the webmethod inside a master page browser close javascript function.It not working.

This is my scriptcode:
Expand|Select|Wrap|Line Numbers
  1. function BrowserClose()
  2. {
  3.        var getValues = "webmethod";
  4.        PageMethods.ClearValues(getValues,OnSucceeded);   
  5. function OnSucceeded(result)
  6. {      
  7.     alert(result);
  8. }
I call this BrowserClose() into onbeforeunload.


This is my webmethod:
Expand|Select|Wrap|Line Numbers
  1.  [System.Web.Services.WebMethod]
  2.     public static string ClearValues(string getValues)
  3.     {
  4.             string[] splitValue = getValues.Split('|');
  5.         string rowIndex = splitValue[0].ToString();
  6.         return "Its good if it works";
  7.  
  8.     }  
Is there any possiblity for calling the webmethod inside a masterpage

Thanks
Anitha
Sep 14 '09 #1
0 2343

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Tim Gallivan | last post by:
Hello group, I'm trying to develop a proof of concept webservice which asynchronously calls a function in a DLL. The function raises an event when it is finished, and works when used as part of...
7
by: Alessandro Benedetti | last post by:
Hi. I'm calling two methods of a .NET Webservice (A) from another Webservice (B). The A Webservice is made like this: public class WSA: System.Web.Services.WebService { private int X = 0;
9
by: Leffe Andersson | last post by:
Hi folks! I have a MasterPage with some public methods, and I would like to call them from a (app_code) class. Is it possible to set a directive or an assembly reference to a MasterPage from a...
5
by: Islamegy® | last post by:
In my project i have two master page which i change dynamic in runtime.. The first one with 1 ContentPanel "onepanel.master", the second with 2 contentPanel"twopanel.master".. but when i switch...
2
by: Zeba | last post by:
Hi guys! I'm new to JS / Ajax; I've been trying to do an Ajax call to my Webservice ( I'm using C# for code-behind). I'm not using any of the libraries available. I am sending my CustID to the...
2
by: Rissoman | last post by:
I have two user controls on a master page. I can easily bubble up an event on usercontrol 1 from a click event to the page.aspx, than then calls a method on the masterpage, but this causes the...
4
by: faraz | last post by:
I have a javascript function that i want to call masterpage load method called. I cant add onLoad event of body or table in master page. I have put the call to script function in <form>, it...
2
by: jojoba | last post by:
Hello to all! I have a fairly simple webservice running in asp.net ajax under c# (vs 2008). I built the service and it runs just dandy when i test it by itself in visual studio. However, to...
1
by: jojoba | last post by:
Hi I am running asp.net ajax (vs 2008) I have the following webservice listed below. However, i have no idea how to call this from javascript. Originally, before i started using the BeginXXX...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.