I am using visual studio 2015 and asp.net mvc and I want to initialize a session variable in the Session Start method but im not sure about the signature of the method and i couldn't find documentation about it
Here is what i have as of now in my global.asax file :
public void Session_Start()
{
InscriptionPaiementEntities dbm = new InscriptionPaiementEntities();
var NbreItemMax = dbm.INSC_config.Where(p => p.NomParametre ==
"NbreItemMax").FirstOrDefault();
Session["NbreItemMax"] = NbreItemMax.Texte;
}
Any Help would be gladly appreciated
Adjust the method signature.
protected void Session_Start(Object sender, EventArgs e)
{
InscriptionPaiementEntities dbm = new InscriptionPaiementEntities();
var NbreItemMax = dbm.INSC_config.Where(p => p.NomParametre ==
"NbreItemMax").FirstOrDefault();
Session["NbreItemMax"] = NbreItemMax.Texte;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With