如何使用session在页面加载上编写查询

如何使用session在页面加载上编写查询

本文介绍了如何使用session在页面加载上编写查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我想在页面加载中编写查询,就像我们在会话变量中有john时那样,当smith来到他的数据显示时,与john相关的数据进入gridview .. i不会怎么写查询页面加载..i want to write query in page load like when we have john in session variable then data related to john comes into the gridview when smith come his data showss..i dont no how to write query on page load..protected void Page_Load(object sender, EventArgs e) { string username = (string)(Session["UserAuthentication"]); if(Session["UserAuthentication"]!=null) { Label2.Text=username; } else { Response.Redirect("Login.aspx"); } if (!Page.IsPostBack) { data(); tasks(); } }推荐答案 这篇关于如何使用session在页面加载上编写查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-22 12:33
查看更多