Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
function not getting call on vb.net page
 
.js code
 
$('table').delegate('td.EditRow','click',function () {
        var $row = this;
        var userid = $row.id;
        $('#hdnUserId').val(userid);
        $.ajax({
            type: "POST",
            url: "User_Create_Update.aspx/FillData",
            data: "{'userid': " + userid + "}",
            contentType: "application/json; charset=utf-8",            
            success: function (msg) {
                if (msg.d != '') {
                    $('#txtUserCode').val(msg.d.USRM_USER_CD);
                    $('#txtUserName').val(msg.d.USRM_USER_NAME); 
 
                }
            }
        });
        $('#divPopUp').lightbox_me({
            lightboxSpeed: 1000,
            centered: true,
            closeClick: true,
            closeEsc: true
        })
    });
.vb code
<WebMethod()> Public Shared Function FillData(userid As String) As DataTable
 

       Dim dt As DataTable = clsUSRM.GetAllById(userid)
       If dt.Rows.Count >
Posted 29-Jan-13 21:44pm
Edited 29-Jan-13 22:34pm
v2
Comments
JemiM at 30-Jan-13 4:17am
   
is FillData is a webservice method?
JemiM at 30-Jan-13 4:22am
   
what is the URL while browsing?
sayedfarhan at 30-Jan-13 4:42am
   
http://localhost:53427/User_Create_Update.aspx
sayedfarhan at 30-Jan-13 4:32am
   
this is a url
http://localhost:53427/User_Create_Update.aspx
sayedfarhan at 30-Jan-13 4:33am
   
yes FillData is webmethod
JemiM at 30-Jan-13 5:27am
   
Please browse the service url that you have passed as ajax URL and verify it.
sayedfarhan at 30-Jan-13 5:45am
   
jemiM sry i am not getting it please will u elaborate
JemiM at 30-Jan-13 6:02am
   
I have posted a sample.please go through it
JemiM at 30-Jan-13 6:05am
   
Change the question also. User's can't understand your actual issue
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

http://localhost:53427/User_Create_Update.aspx
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Please go though the script and please put url like below
<script type="text/javascript">
$(function() {
$('input[id$=btnPull]').click(function(e) {
e.preventDefault();
$.ajax({
type: "POST",
url: "../Services/EmployeeList.asmx/FetchEList",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
var orders = msg.d;
if (orders.length > 0) {
CreateTable(orders);
}
else {
$("#tbl").text("No records found");
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus);
}
});
});
});
function CreateTable(msg) {
$('#tbl').setTemplateURL('../Template/TemplateEmployee.htm',
null, { filter_data: false });
$('#tbl').processTemplate(msg);
}
</script><pre lang="Javascript">
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 330
1 Sergey Alexandrovich Kryukov 295
2 ClimerChinna 207
3 Magic Wonder 205
4 Gihan Liyanage 192
0 Sergey Alexandrovich Kryukov 8,188
1 OriginalGriff 6,991
2 CPallini 2,598
3 Richard MacCutchan 1,925
4 Abhinav S 1,736


Advertise | Privacy | Mobile
Web04 | 2.8.140826.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2014
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