sub page_load(s as object ,e as eventargs)
 Dim Msg As String 
  Msg = System.Configuration.ConfigurationSettings.AppSettings["key"]
lblMsg.text=Msg
      
  
end sub
访问显示:
Compiler Error Message: BC30311: Value of type 'System.Collections.Specialized.NameValueCollection' cannot be converted to 'String'.Source Error: Line 7:  sub page_load(s as object ,e as eventargs)
Line 8:   Dim Msg As String 
Line 9:    Msg = System.Configuration.ConfigurationSettings.AppSettings["key"]
Line 10:  lblMsg.text=Msg
Line 11: