Asp.Net - Master Page - How to avoid unneccesary calls
<p>I have one question to ask about Asp.Net Master page.
In the master page and page load event i have code like</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
{
   if (!IsPostBack)
   {
     if (Session["UserName"] != null &amp;&amp; Session["UserLastName"] != null)
     {
         lblDisplayName.Text = Session["UserName"].ToString() + " " + Session["UserLastName"].ToString() ;
     }
   }
}
</code></pre>

<p>Master page is applied for Page 1 and Page 2.
Whenever i redirect from Page 1 to Page 2 or Page 2 to Page 1. It executes page load of Master Page. And above code executes each and every time. Is it not possible to set the User Name just one time.</p>

<p>Is there anything so that these could be avoided?</p>

<p>Thanks,
Mahesh.</p>
