I want to set the session timeout in code so it can come from a configurable value.
Can I just do this in global.asax?
Session.Timeout = value;
From the MSDN page describing the TimeOut property:
The Timeout property can be set in the Web.config file for an application using the timeout attribute of the sessionState configuration element, or you can set the Timeout property value directly using application code.
So yes, you can assign a value to this property and the Global.asax is a good place to do this.
web.config?