Value cannot be null. Parameter name: propName

by pietman 28. April 2010 18:43

you get the error: Value cannot be null. Parameter name: propName

the reason could be (it was in my case) that the gridview you are trying to bind contains a comma with no further fields as follow:

  .... DataKeyNames="FullNo1,StudyNo,"

feel free to post other solutions to this error

Tags:

Errors

app settings in web.config

by pietman 22. April 2010 19:05

 In web.config:

<appSettings>
    <add key="ContactUsEmail" value="me@mysite.com"/>
</appSettings>

In your code:

 

using System.Configuration;

        private void SendEmail(string emailbody)
        {
                string V = (string)ConfigurationSettings.AppSettings["ConnectionInfo"];
        }

 

Tags:

c#

asp net maintain scroll position on postback

by pietman 19. April 2010 16:04

either in you web.config file you can add the following entry:

<system.web>
      <pages theme="standard" maintainScrollPositionOnPostBack="true">
</system.web>
 

or for any page you can set the page directive as follow:

<%@ Page MaintainScrollPositionOnPostback="true" .... 

Tags:

c#

About ...

pietman celliersPietman Celliers
Bitlink  Ltd
bitlinkit.com