Click here to Skip to main content
13,091,920 members (58,200 online)
Rate this:
Please Sign up or sign in to vote.
See more:
$('table').delegate('td.EditRow','click',function () {
var $row = this;
var userid = $;
type: "POST",
url: "User_Create_Update.aspx/FillUserDetails",
data: "{'userid': " + userid + "}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
if (msg.d != '') {


lightboxSpeed: 500,
centered: true,
closeClick: true,
closeEsc: true
<System.Web.Services.WebMethod()> _
   <ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
   Public Shared Function FillUserDetails(ByVal userid As String) As DataTable
       Dim dt As DataTable = clsUSRM.GetAllById(userid)
       If dt.Rows.Count > 0 Then
           clsUSRM.USRM_USER_CD = userid
           clsUSRM.USRM_USER_NAME = dt.Rows(1).ToString()
           clsUSRM.USRM_PASSWORD = dt.Rows(2).ToString()
           clsUSRM.USRM_EXPIRY_DT = dt.Rows(3).ToString()
       End If
       Return dt
   End Function
Posted 30-Jan-13 0:17am
Updated 31-Jan-13 1:50am
SChristmas 30-Jan-13 7:22am
Dont post same question multiple times
sayedfarhan 30-Jan-13 7:51am
my subject was not correct so that's why i have posted again
can u please help me
Kschuler 31-Jan-13 11:51am
If something is wrong with your question, you should click the Improve Question link and edit it. Not post again.
ryanb31 30-Jan-13 8:39am
Is there an error? Do you have [System.Web.Script.Services.ScriptService] on your webservice class?
sayedfarhan 30-Jan-13 8:56am
hi ryan i am new to all this can u please tell me from where to check webservice class

i have Imports System.Web.Services in my .vb page
ryanb31 30-Jan-13 9:05am
after your imports statement will be a declaration of your class. You need [System.Web.Script.Services.ScriptService] right above your class declaration, as an attribute of the class. If you created the webservice with the "Add new" webservice option it likely is already there but commented out.
sayedfarhan 30-Jan-13 8:59am
there is no error but still i am unable to access webmethod which i have return in .vb page also i have checked my syntax in .js page for ajax it is right
ryanb31 30-Jan-13 9:06am
So, what does msg come back as?
sayedfarhan 30-Jan-13 9:50am
ryan can we use teamviewr
ryanb31 30-Jan-13 9:53am
No, sorry, I'm in the middle of work.
sayedfarhan 30-Jan-13 10:02am
we have to import webservices.dll and where to write webmethod code in
ryanb31 30-Jan-13 10:21am
Your code should be something like this

' Visual Basic
Public Class Service1
Inherits System.Web.Services.WebService
<> _
Public Function GetBigData() As DataSet
'implementation code
End Function
End Class

Notice the first line, right about the name of the class. This tells the webmethod that it can be called from script.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Make sure that you have properly used ScriptManager tags inside forms tag in your aspx code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100