思归,和微软专家,请问这是什么问题???? strPropertyID设置static或者用ViewState,Session等记录strPropertyID;因为Web编程是无连接的 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 qiushuiwuhen(秋水无恨) :设置static恐怕不太好吧,一个用户该了这个值,其它地方得到这个变量值会随之更改的.你说用session,s是说我直接定义一个:如:Session["PropertyId"]=strPropertyID,是吧?!ViewState是怎样用的,干什么的?能说明一下吗? 主要是因为你在B页面的其他事件引起了 postback,而你的程序只有在!Page.IsPostBack 时才取得 strPropertyID的值。public string strPropertyID;private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here //Tool.checkRightsAndPropetyID(this); strPropertyID = Context.Items["PropertyID"].ToString(); BlockCode_Textbox.Text =Context.Items["Block Code"].ToString(); BlockName_TextBox.Text = Context.Items["Block Name"].ToString(); Manager_TextBox.Text = Context.Items["Manager"].ToString(); CommenceDate_TextBox.Text =Context.Items["Commence Date"].ToString(); } asp.net中插入一个音乐播放器 repeater如何控制表格的生成 js<%=Resources.Strings.wxts2%>问题 vs中的关于链接的问题.....感兴趣的都进来看下。 这个tab效果这么实现的? 谁有好一点的图表控件? 子页面如何访问母版页的div SQLyogEnt数据库 谁能给我个注册页面的源代码额?连接SQL的... 在DataView过滤掉一些列, 使DataTable中的一些列不显示出来,怎么办 谁有ASP.NET的WEB控件的详细资料,给出链接地址和发到我信箱均可,万分感谢! 请教:为什么动态创建的web控件创建后无法找到?一定给分
ViewState是怎样用的,干什么的?能说明一下吗?
!Page.IsPostBack 时才取得 strPropertyID的值。public string strPropertyID;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
//Tool.checkRightsAndPropetyID(this); strPropertyID = Context.Items["PropertyID"].ToString();
BlockCode_Textbox.Text =Context.Items["Block Code"].ToString();
BlockName_TextBox.Text = Context.Items["Block Name"].ToString();
Manager_TextBox.Text = Context.Items["Manager"].ToString();
CommenceDate_TextBox.Text =Context.Items["Commence Date"].ToString();
}