We have gridview control deployed as a web part on our SharePoint site. We are looking to limit the rows on gridview to 5. But, we do not want to mention this on our code , however we want it to be mentioned in the web.config file. So that, whenever, we decide to change the number of rows it is easy to change directly in the web.config file.
Is this开发者_运维技巧 possible, please let me know as it is very urgent.
Thanks so much in advance.
Your question isn't "sharepoint" but rather a general .net how do I read from my web.config file.
Welcome to the wonderful world of the configurationmanager class
http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.appsettings.aspx
精彩评论