zoukankan      html  css  js  c++  java
  • C# Server.Transfer传值方式

    1. //页面CreateFilePath.aspx.cs   
    2. public  partial  class  CreateFilePath : System.Web.UI.Page  
    3. {  
    4.     //要传给Default.aspx页面的值   
    5.     public   string  Name  
    6.     {  
    7.         get  {  return   "ffff" ; }  
    8.     }  
    9.   
    10.     protected   void  Page_Load( object  sender, EventArgs e)  
    11.     {  
    12.         //终止当前页面,使用指定路径执行一个新页面   
    13.         Server.Transfer("Default.aspx" );  
    14.     }  
    15. }  
    16.   
    17. //页面Default.aspx.cs   
    18. public  partial  class  _Default : System.Web.UI.Page   
    19. {     
    20.     protected   void  Page_Load( object  sender, EventArgs e)  
    21.     {  
    22.         //获取负责处理次HTTP请求的对象,转化为CreateFilePath类实例   
    23.         CreateFilePath d = Context.Handler as  CreateFilePath;  
    24.   
    25.         //获取值   
    26.         Response.Write(d.Name);  
    27.     }  

  • 相关阅读:
    k8s蓝绿
    nginx总结
    promethues监控 之 TCP连接数
    制作私有ssl证书
    redis命令
    zabbix主机自动发现
    Kubernetes各组件服务重启
    linxu下常用命令
    encodeURIComponent
    查询条件
  • 原文地址:https://www.cnblogs.com/hanwest/p/2881894.html
Copyright © 2011-2022 走看看