Questions tagged [webmethod]

WebMethod is an attribute that is marked to indicate that a function (usually in .NET) in a web service is exposed to the consumers of the web service.

The WebMethod attribute is attached to a public method (cannot be attached to a private/protected) that you want the method exposed as part of the .NET Web service. It is also used to further configure the behavior of the method by passing additional attributes. Check out the MSDN link for more information, How to: Use the WebMethod Attribute.

1317 questions
-1
votes
1 answer

Returning json to client via webmethod

I'm trying to implement a very simple login system for a webapi backend. The site will only have one login, which is an admin, which will allow create/update/delete actions. For this reason, I'm trying to implement a simple login with usernames and…
Isaiah Lee
  • 647
  • 3
  • 9
  • 18
-1
votes
1 answer

ASP.Net with html client side controls JQuery

I want to develop a very big product with many categories. I want to use Asp.net forms with jQuery and WebMethods like $.ajax({ type: "POST", url: "Just.aspx/Fetch", data: "{'date':'" + sdate + "','edate':'" + edate + "'}", …
user3244721
  • 714
  • 2
  • 11
  • 29
-1
votes
1 answer

Webservice returning byte array

I have a webservice that gets a list of byte[] from the db. I want to be able to return all the values. How do I return a byte[]. [WebMethod] public List StudentVerifications() { List
-1
votes
2 answers

No way to interact with controls through webmethod?

I'm starting to believe there is no way for me to interact with asp controls from within a webmethod. I wouldve thought i could some how accomplish this, by finding the page the webmethod was called from, and from there find and update controls on…
Mathias
  • 119
  • 1
  • 2
  • 16
-1
votes
1 answer

Calling Webservice with parameter value equal 1

I have a strange problem with webservices. There is a WebMethod as below: public string GenerateUrl(string webserviceId,string webmethodId, string versionId) { return @"C:\" + webserviceId + @"\" + webmethodId + @"\Versions\V" + versionId +…
Heba El-Fadly
  • 281
  • 1
  • 5
  • 17
-1
votes
2 answers

Boolean response from c# web method doesn't work

This is my very first attempt on ajax! I'm unable to find a good post on the internet from where I could learn and apply to my project. Let me show you the code straightaway! [WebMethod] protected bool CheckUsername(string username) { …
vohrahul
  • 1,123
  • 10
  • 17
-1
votes
2 answers

C# webmethod to load data from MySQL on page scroll

Im working on a web application in which I need to show data from MySQL on page scroll. In my codebehind I have a [WebMethod] GetData() which connects to MySQL_DB. However I could only able to show first column in my table, below is the code. I want…
Venka Yeluri
  • 45
  • 2
  • 11
-1
votes
1 answer

PageMethods.set_path does not work in urlrewriting

I have a test web application that calls a single PageMethod via Javascript function. PageMethods.myMethod(params, onSuccess, onFailed); When i use urlRewriting it doesn't work anymore. So, i searched web and i found this to add to js…
-1
votes
1 answer

Pass variable from Javascript webmethod call to success function

I have a button click on which i have to call a webmethod and on success of the method, i need pass the parameter "this" to the function. $(".login").click(function () { var parent = $(this).parent().parent(); var id =…
nimi
  • 5,359
  • 16
  • 58
  • 90
-2
votes
1 answer

How get async method value from non async method

I have async method called GetDetails(); to get data from API. public async Task GetDetails(string token, int tenantId, string fromDate,string searchText) { try { string serviceUrl =…
thomsan
  • 433
  • 5
  • 19
-2
votes
1 answer

How to store Class into List in C#

I know this may be silly question. But to be formal I want to store these Class field into list. I tried multiple times but still same things I am facing. I already spend couple of days' to fix this error but unsuccess Please help me on same I want…
Nits Patel
  • 380
  • 3
  • 15
-2
votes
1 answer

Copy file(directory) to clipboard after exporting to pdf

I want to store the exported pdf file to clip board to be able to paste as an attachment in outlook. I'm using asp.net / vb and i've tried to import system.windows.forms in my web application to use the clipboard class. any idea? 'here's my…
Hack Dawg
  • 108
  • 9
-2
votes
1 answer

How to print fibonacci numbers in a flow service webmethods SoftwareAG Designer?

How to print fibonacci numbers in a flow service webmethods SoftwareAG Designer?
-2
votes
3 answers

textbox values are taking string value so now how to validate input should be integer not string

$(document).ready(function() { Function arraysort(text) { $.ajax({ type: "POST", url: "default.aspx/sort", data: JSON.stringify({ arr: text.split(',') }), …
ziel
  • 127
  • 2
  • 11
-2
votes
2 answers

How to call a method in c# class by jQuery Ajax without using MVC,WebForms concepts

I need to call a C# method by using attribute [WebMethod] and it should not use MVC, WebForms, API. It should be a clean c# class (.CS), HTML file. Here is my WebMethod: [WebMethod] public string GetMessage() // Home.CS { …
Prashanth
  • 111
  • 1
  • 10
1 2 3
87
88