question about inheritance

N

Niklas Olsson

Hello
I have a ASP solution that I'm migrating to ASP.NET and the first part is to
share session.
This works just fine
I do this
http://www.microsoft.com/japan/msdn/net/aspnet/converttoaspnet.aspx

The default HttpSession is overridden with a custom session object.

In their aspx file they do

<%@ Page Language="C#" Debug="true" Inherits="MSDN.SessionPage" %>

<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Session["fName"] = "a string";


}
</script>

this works just fine, however I have created a new aspx page to try this,
that uses code behind
so in that one I don't inherit "MSDN.SessionPage" but instead "Login"
how do I call this new session object properly in my code behind file?
I first tried to add "using MSDN" but it doesn't work very well
it never call it own "override protected void OnInit(EventArgs e)" (see the
msdn example for more details)

thanks
/Niklas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,263
Messages
2,571,064
Members
48,769
Latest member
Clifft

Latest Threads

Top