| | |
web.config(asp.net) vs app.config(vb.net)
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2008
Posts: 1
Reputation:
Solved Threads: 0
Hi, i juz wanted to know how to write this following codings in app.config.
In ASP.Net in web.config:
N in codings part:
Now how to do the same thing in VB.Net(app.Settings)
I tried app.config:
N in codings part:
ASP.Net is not a prob but how to do the same thing in vb.net. The above codes was taken in net but doesnt work. Help me please... n plz do xplain d codes 2...
In ASP.Net in web.config:
MS SQL Syntax (Toggle Plain Text)
<configuration> <appSettings> <add KEY = "stu" value = "database = Gred; trusted_connection = yes; server = (local)"> </appSettings> </configuration>
N in codings part:
MS SQL Syntax (Toggle Plain Text)
Imports System.DATA.SqlConnection Dim con AS New SqlConnection (ConfigurationSetting.AppSettings("stu"))
Now how to do the same thing in VB.Net(app.Settings)
I tried app.config:
MS SQL Syntax (Toggle Plain Text)
<configuration> <appSettings> <add KEY = "stu.ConnectionString" value = "datasource = Gred; initial catalog = Apps; Integrated Security = SSPI; packet size = 4096"/> </appSettings> </configuration>
N in codings part:
MS SQL Syntax (Toggle Plain Text)
Imports System.DATA.SqlClient Me.stu.ConnectionString = CType (System.Configuration.ConfigurationSettings.AppSettings.GetValues("stu.ConnectionString"))
Last edited by peter_budo; Aug 23rd, 2008 at 6:35 pm. Reason: Use code tags instead of color tags
![]() |
Similar Threads
- ASP.NET Registration Page (ASP.NET)
- Problem with Provider Management in ASP.NET 2.0 (ASP.NET)
- Pls Help Me Out Ooo? (VB.NET)
- Request for the permission of type 'System.Web.AspNetHostingPermission' [...] failed. (ASP.NET)
- WizardSteps-> SQL Insert -> Grab ID field (ASP.NET)
- IE doesn't launch (Viruses, Spyware and other Nasties)
- help with asp.net/JS and cookies (ASP.NET)
Other Threads in the MS SQL Forum
- Previous Thread: Delete duplicate rows
- Next Thread: General question-SQL Server 2005 Developers Edition and SQL Server Management Studio
| Thread Tools | Search this Thread |





