asp.net开发中小程序端跟后端交互中的发现

小程序端wxml端代码示例:

复制代码
<button bind:tap="test">提交</button>

小程序端js代码示例:

复制代码
  test(){
     console.log('ok')
     wx.request({
       url: 'https://localhost:44375/lianxi01.aspx',
     })
  },

asp.net端代码示例:

复制代码
cs端代码示例:
{
    public partial class lianxi01 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        // // .aspx.cs
        public static int getvalue(int value)
        {
            return 555 * value;
        }
    }
}

html端代码:

复制代码
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="lianxi01.aspx.cs" Inherits="lianxi_jiaohu.lianxi01" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <!--.aspx-->
            <div><%=getvalue(2)%></div>
        </div>
    </form>
</body>
</html>

小程序端运行结果如下:

复制代码
在这里插入代码片

会出现一个在小程序管理后台端曾经配置过的域名数组。同时要求把现在的地址:https://localhost:44375/lianxi01.aspx配置到管理后台

相关推荐
说私域1 天前
开源AI智能名片链动2+1模式S2B2C商城小程序:分享经济时代的技术赋能与模式创新
人工智能·小程序·开源
低代码布道师1 天前
医疗小程序05我的就诊卡
低代码·小程序
阿拉斯加的头头儿1 天前
小程序下载图片问题处理
小程序
一 乐1 天前
校园墙|校园社区|基于Java+vue的校园墙小程序系统(源码+数据库+文档)
java·前端·数据库·vue.js·spring boot·后端·小程序
LXA08091 天前
在 UniApp 中为小程序实现视频播放记录功能
小程序·uni-app·音视频
千寻技术帮2 天前
50015_基于微信小程序的红色旅游系统
微信小程序·小程序·源码·ppt·项目文档
sg_knight2 天前
微信小程序中 WebView 组件的使用与应用场景
前端·javascript·微信·微信小程序·小程序·web·weapp
2501_916007472 天前
iOS性能调试工具终极指南,从系统底层到多端协同的全方位优化实践(2025版)
android·ios·小程序·https·uni-app·iphone·webview
2501_915921432 天前
iOS崩溃日志深度分析与工具组合实战,从符号化到自动化诊断的完整体系
android·ios·小程序·uni-app·自动化·cocoa·iphone
我很苦涩的2 天前
使用微信小程序实现多格验证码效果
微信小程序·小程序