In my web.config file, I defined the following: -
<add key="TechPageSize" value="20" />
But I cannot refer to this value in my paging parameters as follows: -
var servers = repository.AllFindServers(withOutSpace).OrderBy(a => a.Technology.Tag).ToPagedList(page, (Int32)System.Web.Configuration.WebConfigurationManager.AppSettings["TechPageSize"]);
and I get an error that it cannot change String to INT.
Any idea what the problem is?
source share