| |

VerySource

 Forgot password?
 Register
Search
View: 681|Reply: 2

asp.net calls AjaxPro.2.dll with a null issue ~ `

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-8 11:00:02
| Show all posts |Read mode
I reference AjaxPro.2.dll in the project and call the background method from the foreground, but the return value received is often null. How can I avoid returning null ??????
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-5 15:30:02
| Show all posts
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
<a href="http://www.2d99.com\do\001.rm" onclick="javascript:AddDownLoad();">Download</a>
    </form>
    <script>
function AddDownLoad() {
// The method GetSubCategory is a method that is declared as AjaxMethod() in the background.
// After all the parameters of the method GetSubCategory, add another method name GetSubCategory_backcall as a parameter,
// If the method GetSubCategory has a return value, its return value will be assigned to the first parameter of the method GetSubCategory_backcall
MyAJAX.Test.GetSubCategory(5,GetSubCategory_backcall);
}
To
// The name of this method is arbitrary, the number and names of parameters are also arbitrary, but the AJAX method
// The return value will only be assigned to the first parameter
function GetSubCategory_backcall(response)
{
var dt = response.value;
alert(dt);
}
</script>
</body>
</html>
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-5 16:00:01
| Show all posts
It may be null that the background method itself has no return value, or you have written it wrong, and has nothing to do with AjaxPro.2.dll
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list