有一个小问题一直没搞清楚,还请各位朋友解答一下。
public partial class xxxxx : System.Web.UI.UserControl
{
public UserInfo userInfo = new UserInfo(); //这里创建的变量会影响网页访问速度吗? protected void Page_Load(object sender, EventArgs e)
{
//给实体类赋值
}
}
ASPX 页面使用
<%=userInfo.Name %>
//页面我用这种方式取值 ,我想问的就是这种方法会不会影响速度网页速度,有没有其他更好的办法给页面赋值?