Hello,
First define your value in web.config as per below code,
<configuration>
<appsettings>
<add key="Connstring" value="your value" />
</appsettings>
</configuration>
Then write below code in your aspx.cs page,
string Connstring = System.Configuration.ConfigurationManager.AppSettings["Connstring"];