博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
多表单提交
阅读量:4654 次
发布时间:2019-06-09

本文共 1127 字,大约阅读时间需要 3 分钟。

控制器代码:

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using Mvc1.Models;namespace Mvc1.Controllers{    public class HomeController : Controller    {
public ActionResult Other1() { return View(); } public ActionResult FFF(string one, string two) { int end = Convert.ToInt32(one) + Convert.ToInt32(two); Session["end"] = end; return RedirectToAction("Other1"); } public ActionResult GGG(string one, string two) { int end = Convert.ToInt32(one) - Convert.ToInt32(two); Session["end"] = end; return RedirectToAction("Other1"); } }}

界面代码:

@{    Layout = null;}    
Other1
@{ if (Session["end"] != null) {
@Session["end"].ToString() Session["end"] = null; } }

 

转载于:https://www.cnblogs.com/123lucy/p/5828690.html

你可能感兴趣的文章
HDU1233--还是畅通工程(最小生成树)
查看>>
linux——实际工作中如何使用linux
查看>>
设置 jsp 表格相邻两行的颜色不一样
查看>>
性能指标分析
查看>>
Jenkins企业应用
查看>>
[POJ 1061]青蛙的约会
查看>>
使用SeaJS实现模块化JavaScript开发
查看>>
开源项目如何赚钱
查看>>
BZOJ 1260 [CQOI2007]涂色paint(区间DP)
查看>>
HDU 1005 Number Sequence
查看>>
7 种将字符串反转的 Java 方法
查看>>
Softmax函数
查看>>
【题解】贪婪大陆
查看>>
notepad ++ 编辑 powershell profile 文件时的诡异问题
查看>>
这是一个测试文章
查看>>
struts2——文件下载(简单的功能)
查看>>
Java Bean Validation 最佳实践
查看>>
2018的第二篇博客 关于SSH框架的注解版整合
查看>>
PHP流程管理,堪比小小程序
查看>>
1.Mongo聚合
查看>>