What should be done to make a session cookieless

Thursday, June 25, 2009

Change the web.config file with the following setting to create a ASP.NET cookieless session ,



set the cookieless attribute to 'false', as

<sessionstate timeout='20' cookieless='false' mode='InProc'>

how will u check whether the user is supportig cookies?

The only way to check whether a client accepts cookies or not is , to create a cookie and read it back.

If you are able to read it back then , its accepting else not.

what does '()' denote in the object creation statement

what does '()' denote in the object creation statement?

It denotes the constructor.

How to call a base class constructor from a derived class?

How to call a base class constructor from a derived class?

using System;
using System.Collections.Generic;
using System.Text;

namespace OOPTest7
{
class A
{
public A()
{
Console.Out.Write("base A");
}
public A(string s)
{
Console.Out.Write(s);
}

}

class B : A
{

public B() : base("base cons called from Derived")
{
Console.Out.Write("B");
}

}



class Program
{
static void Main(string[] args)
{
B b= new B();
Console.In.Read();
}
}
}

interface ,the class which implemented it and its object, with interface in left hand side during creation

If a class IA is implementing an interface I which is having a method a, then
can is the following allowed? Will that have all the methods of IA apart from that of interface I?

I a = new IA();

Yes. always the base class or interface can contain derived class, but it will have
only those of the base. So it will not have members of IA which are not from interface I.

using System;
using System.Collections.Generic;
using System.Text;

namespace OOPTest6
{
interface I
{
void a();
}

class IA : I
{
public void a()
{
Console.Out.Write("a");
}
public void nonintfacemeth()
{
Console.Out.Write("nonintfacemeth");
}


}


class Program
{
static void Main(string[] args)
{
I i = new IA();
i.a();

}
}
}

LinkWithin

Blog Widget by LinkWithin

Recommended Books