in this program, getting either output nor error.
so please check whether function ClassAdd() has any error.
Also note that I am getting result in another way( see in the last part of this post)
.aspx code:-
webService.cs:- [WebMethod] public void ClassAdd(string a, int b) { ClassSP spClass = new ClassSP(); ClassInfo InfoClass = new ClassInfo(); InfoClass.className = a; InfoClass.Seats = b; spClass.classAdd(InfoClass); } I am getting result and data is being inserted to the database with the help of WebService. I put break point in the ClassAdd() function in WebService.cs file. And here the happenings after i press F10:- When click on ClassAdd:- And I am getting this when I press Invoke button:- And then I am getting the Message:-"Saved Sucessfully" The window below not giving me the output:- So please give me the cause to these functions. 4 AnswersKnow the answer? Post it. Somebody with the same question will find it here. Answer a question in the forums and earn +20 SHARP for every answer. See unanswered questionsForums Top experts DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister |


Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Sep 5, 2013, 11:34 PM EDT
What output you want?
What output you are getting?
Bineesh ViswanathRank #1,681 · 907 reputationPosted Sep 5, 2013, 11:48 PM EDT
But I need the function through JQuery.
Here My JQuery for Save() function:-
in button:
if any problem plz put a break poin in webservice method and check its going to that or not. if not share your full webservice .cs code.
Bineesh ViswanathRank #1,681 · 907 reputationPosted Sep 6, 2013, 1:28 AM EDT
I want to do the ClassAdd() function through the .aspx.
Mr. Sanjeeb, I added the code you gave, but still no improvement to the program.
here the WebService.cs code:-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
///
/// Summary description for WebService
///
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService {
public WebService () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public void ClassAdd(string a, int b)
{
ClassSP spClass = new ClassSP();
ClassInfo InfoClass = new ClassInfo();
InfoClass.className = a;
InfoClass.Seats = b;
spClass.classAdd(InfoClass);
}
}
And Webservice.asmx code:-
<%@ WebService Language="C#" CodeBehind="~/App_Code/WebService.cs" Class="WebService" %>