https://stackoverflow.com/questions/14956027/how-to-pass-values-across-the-pages-in-asp-net-without-using-session

You can pass values from one page to another by followings..

Response.Redirect
Cookies
Application Variables
HttpContext

Response.Redirect

SET :

Response.Redirect("Defaultaspx?Name=Pandian");

GET :

string Name = Request.QueryString["Name"];

Cookies

SET :

HttpCookie cookName = new HttpCookie("Name");
cookName.Value = "Pandian";

GET :

string name = Request.Cookies["Name"].Value;

Application Variables

SET :

Application["Name"] = "pandian";

GET :

string Name = Application["Name"].ToString();

Refer the full content here : Pass values from one to another

Note:

for the cookies, and the Application. Especial the Application is not working if you use webgarden or webfarm !. And the application variables are a simple Dictionary<> that exist only for compatibility with the old asp and is not to be used. Also the cookies are not for transfer data from page to page like that. Very bad design, not good practice.

How to pass values across the pages in ASP.net without using Session的更多相关文章

  1. Creating Help Pages for ASP.NET Web API -摘自网络

    When you create a web API, it is often useful to create a help page, so that other developers will k ...

  2. Razor Pages with ASP.NET Core 2

    With ASP.NET Core 2 we get another way of building web applications. It’s one of those new things th ...

  3. [RxJS] Implement RxJS `mergeMap` through inner Observables to Subscribe and Pass Values Through

    Understanding sources and subscribers makes it much easier to understand what's going on with mergeM ...

  4. Introduction to Razor Pages in ASP.NET Core

    https://docs.microsoft.com/en-us/aspnet/core/mvc/razor-pages/ 从ASP.NET Core 2.0.0版本之后,添加了新的特性Razor p ...

  5. [Angular 2] Passing Template Input Values to Reducers

    Angular 2 allows you to pass values from inputs simply by referencing them in the template and passi ...

  6. Transferring Data Between ASP.NET Web Pages

    14 July 2012 20:24 http://www.mikesdotnetting.com/article/192/transferring-data-between-asp-net-web- ...

  7. Customizing Site-Wide Behavior for ASP.NET Web Pages (Razor) Sites

    Customizing Site-Wide Behavior for ASP.NET Web Pages (Razor) Sites By Tom FitzMacken|February 17, 20 ...

  8. 使用ASP.NET Web API Help Pages 创建在线接口文档

    操作步骤 1.新建Web API项目 2.在项目Areas文件夹下找到以下文件,取消注释图中代码. 3.右键解决方案,属性,如图设置. 4.运行程序,点击右上角API 接口列表: 详情-无参数: 详情 ...

  9. Demystifying ASP.NET MVC 5 Error Pages and Error Logging

    出处:http://dusted.codes/demystifying-aspnet-mvc-5-error-pages-and-error-logging Error pages and error ...

随机推荐

  1. Windows操作系统命令整理-Win7

    注册表(Windows95以后Windows系统版本,windows server中regedit和regedit32合并为一个新的编辑器,名称仍然是regedit) HKEY_LOCAL_MACHI ...

  2. xmake新增智能代码扫描编译模式

    最近给xmake增加了一个新特性,对于一份工程源码,可以不用编写makefile,也不用编写各种make相关的工程描述文件(例如:xmake.lua,makefile.am, cmakelist.tx ...

  3. 如何判断一段程序是由C 编译程序还是由C++编译程序编译的

    以下是在论坛中看到的两种解释: (1)如果是要你的代码在编译时发现编译器类型,就判断_cplusplus或_STDC_宏,通常许多编译器还有其他编译标志宏, #ifdef __cplusplus co ...

  4. [Git] 004 初识 Git 与 GitHub 之查看历史记录

    在 GitHub 的 UI 界面使用 Git 查看历史纪录 1. 右侧有个 history 2. 点击后跳转页面 3. 点击相应标题(commit 时写的),进入相应版本(历史) 4. 我选择了 I ...

  5. Hadoop Map/Reduce

    Hadoop Map/Reduce是一个使用简易的软件框架,基于它写出来的应用程序能够运行在由上千个商用机器组成的大型集群上,并以一种可靠容错的方式并行处理上T级别的数据集.一个Map/Reduce ...

  6. linux复杂命令

    1,查看包含zypper且不包含ar的进程信息的2,3,8,9列信息 ps -ef|grep zypper|grep -v ar|awk '{print $2,$3,$8,$9}' eg:查看包含zy ...

  7. #python# error:illegal multibyte sequence

    读取html遇到illegal multibyte sequence 1.第一种情况:更换编码方式 查看网页源码,找到charset,得到该网页编码方式 <meta http-equiv=&qu ...

  8. 2019 Multi-University Training Contest 3 - 1006 - Fansblog - 打表 - 暴力

    http://acm.hdu.edu.cn/showproblem.php?pid=6608 题意:给一个比较大的质数P(1e14以内),求比它小的最大的质数Q(貌似保证存在的样子,反正我没判不存在) ...

  9. javascript(DOM)实例

    JavaScript学习笔记 JS补充笔记 实例之跑马灯,函数创建.通过ID获取标签及内部的值,字符串的获取与拼接.定时器的使用 使用定时器实现在console中打印内容 Dom选择器使用与调试记录 ...

  10. 怎样使一个宽为200px和高为200px的层垂直居中于浏览器中?写出CSS样式代码。

    div{ height:100px; width:100px; position:absolute; top:50%; width:50%; margin-letf:-100px; margin-to ...