将HttpCookie值设为选项卡名称 [英] Make HttpCookie value as tab name

查看:51
本文介绍了将HttpCookie值设为选项卡名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好



在我的asp.net应用程序中有一个名为:"的cookie。位置。我想要做的是在另一个页面,我想传递此值,并使值是浏览器选项卡中的页面标题。 (请注意我正在使用c#)



cookie值如何显示在标签中的示例:

ABC Sweden


由于ABC是网站名称,而瑞典是cookie值,将是一个国家名称,如美国或瑞典等。

Hello

Into my asp.net application there is a cookie called: " Location ". what i am looking for to do is in another page i want to pass this value and make the value is a page title in browser tab. (please note that i am using c#)

Example of how the cookie value will look like into tab:
ABC Sweden

As ABC is the website name and Sweden is cookie value will be one country name such as USA or Sweden etc.

推荐答案

通过从Cookie中获取值来设置第二页中的页面标题



set page title in second page by fetching the value from Cookie

this.Page.Title = "ABC - "+Request.Cookies["Location"].Value;


这篇关于将HttpCookie值设为选项卡名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆