我有一个index.aspx(index.aspx.cs),它将包含使用Server.exectue(“body.aspx”)的body.aspx(body.aspx.cs);从另一页后面的代码访问变量
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
public partial class index : System.Web.UI.Page
{
public string text1 = "abc";
protected void Page_Load(object sender, EventArgs e)
{
}
}
在index.asp.cs
,还有就是我想在body.aspx.cs使用它的可变文本1,该怎么做?
感谢
为什么不使用母版页,而不是“注入”手动一起网页? –
,因为我是一名PHP程序员 – hkguile
也许这是不可能的,也许它更好地遵循asp.net的方式,当你在网点上编程。 – Aristos