首页 > 编程语言 >C# webform 在aspx页面调用aspx.cs页面的方法

C# webform 在aspx页面调用aspx.cs页面的方法

时间:2024-05-21 08:59:55浏览次数:17  
标签:console string C# ipEndDate ddlTypeValue aspx startDateValue 页面

前台代码

--调用后台的GetEcharts1方法,并传入三个参数
startDateValue,ipEndDate,ddlTypeValue
<input type="button" id="loadExce2l" value="查看" onclick="loadEcharts()" />

function loadEcharts() {
console.log(19999999999)
var startDateValue = document.getElementById("ipStartDate").value;
var ipEndDate = document.getElementById("ipEndDate").value
var ddlTypeValue = document.getElementById('ddlType').value;

 $.ajax({
                url: "frmCIMES_IQCWeeklyAndMonthlyReports.aspx/GetEcharts1",
                type: "POST",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                data: JSON.stringify({
                    startDateValue: startDateValue,
                    ipEndDate: ipEndDate,
                    ddlTypeValue: ddlTypeValue
                }),
                success: function (response) {
                    console.log(17777777772222222)
                    var lists = response.d;
},
                error: function (err) {
                    console.log(1666666666666)
                    console.log(err)
                    alert(err);
                }
            });
}

 

后台代码

   [WebMethod(EnableSession = true)]
    public static List<List<object>> GetEcharts1(string startDateValue, string ipEndDate, string ddlTypeValue)
    {  string strStartDate = startDateValue.Trim();
            string strEndDate = ipEndDate.Trim();
            string strTypeValue = ddlTypeValue;
            string jsonData = string.Empty;
}

 

标签:console,string,C#,ipEndDate,ddlTypeValue,aspx,startDateValue,页面
From: https://www.cnblogs.com/kelenote/p/18203224

相关文章

  • 【博客园发文技巧】不离开编辑页面,批量添加图片链接和设置图片大小
    参考文档:https://www.cnblogs.com/sanshi/p/3794796.html起因在博客园写文章,有时需要上传好多大图片,如果这些图片过大,则会导致页面变形。因此有一个实际的需求,能够在博客园的编辑页面,直接批量修改所有图片的大小,然后给这些图片添加链接,以便点击时转到大图。简单实现在博客园......
  • 华为云CodeArts 12大安全防护机制,端到端全面保障软件供应链安全!
    全球网络安全事件频发不断,企业纷纷损失惨重。2021年11月,知名logo4j漏洞波及全球多达6万款开源软件,70%以上企业受影响。2022年3月,大型加油站服务商遭到勒索软件攻击,要求其支付200万美元赎金,以换取解密器。为此,国内推出相关法规加强网络安全风险管控。比如2023年6月,金融监管总局......
  • CMU_15445数据库课程2023Fall
    这一个Project是让我们了解C++的语法以及改数据库项目的整体框架,基本的锁的使用,怎么Debug.一些零碎的知识碎片我放到最后了,以前是写C的,C++的很多语法还不是很熟悉,很多新的语法更不知道该怎么用.这次作业完成也是受益良多.Copy_on_Write字典树首先必须明确一个概念,......
  • dotnet 命令行工具解决方案 PomeloCli
    目录PomeloCli是什么为什么实现太多的工具太少的规范基于二进制拷贝分发难以为继快速开始1.引用PomeloCli开发命令行应用2.引用PomeloCli开发命令行插件开发命令行插件搭建私有nuget服务发布命令行插件3.使用PomeloCli集成已发布插件安装命令行宿主集成命令行插件卸......
  • rancher添加k8s节点时显示节点已添加
    由于几台服务器都用相同的外部externalip,而添加k8s节点时有外部ip先使用外部ip,所以会显示节点已添加,无法添加成功,此时需要用--address参数来指定内部ip,这样节点就由内部ip来添加如下添加k8s节点的命令:sudodockerrun-d--privileged--restart=unless-stopped--net=ho......
  • Reflective Journal III
    Theprocessofmakingadigitalstory:Whenichoosethestory,thefirstideainmymindisanantienttaleihavereadwithmynephew.Soidecidedtochangethepointofviewofthistale.Atfirst,isimplifiedthestoryandfoundtheprotagonist,putting......
  • Reflective Journal III
    ItriedtousethefirstpersonpointofviewtonarrateSleepingBeauty,whichismyfavoritestoryinmychildhood.Soinordertocreateacompletedigitalstory,thefirststepItookwastosearchforthedetailsofthestory.Afterthis,Ifoundsom......
  • 多状态马尔可夫链、生存分析心脏同种异体移植血管病变(CAV)数据可视化|附数据代码
    原文链接:https://tecdat.cn/?p=36216原文出处:拓端数据部落公众号临床研究和医疗经济学研究中客户经常关注于评估患者在疾病从一种状态发展到另一种状态时的生存预后。标准生存模型仅直接模拟两种状态:存活和死亡。多状态模型允许直接模拟疾病进程,在这些过程中,患者在随机的时间间......
  • C++——类
    C++学习类一、定义class类名{public://外界可以直接访问或者调用private://不能被外部所访问或调用,只能被本类内部访问};二、类的成员函数类的成员函数是指那些把定义和原型写在类定义内部的函数,就像类定义中的其他变量一样。类成员函数是类的一个成......
  • CSS选择器
    一、CSS选择器二、CSS选择器实例按照class属性值取出网页信息fromscrapyimportSelectorhtml="""<htmllang="en"><head><metacharset="UTF-8"><title>bobby基本信息</title><scriptsrc="jquery......