Zugriffsvariable aus Code hinter einer anderen Seite
Ich habe eine index.aspx (index.aspx.cs), die die body.aspx (body.aspx.cs) mit Server.exectue ("body.aspx") enthalten wird;
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)
{
}
}
In index.asp.cs gibt es eine Variable text1, die ich in body.aspx.cs verwenden möchte. Wie geht das?
Vielen Dank