I am using ASP.net 2.0 and I wanna use some vbscript to get data. But I dun want to dispaly the DB connection string when the users right click the page and view the sources.
I tried this method but not work. (It works in ASP.net 1.0)
1. Add AspCompat="true " at the top of the page, use <!--#include virtual="common/DBconn.inc"--> to define a variable
<%
Const DB_CONNECT_STRI NG = "PROVIDER=MSDAS QL;XXXXXXXX%>
<script language="vbs">
set adocon=CreateOb ject("ADODB.Con nection")
'Set the connectionstrin g
adocon.Connecti onString =DB_CONNECT_STR ING
</script>
Any idea??
I tried this method but not work. (It works in ASP.net 1.0)
1. Add AspCompat="true " at the top of the page, use <!--#include virtual="common/DBconn.inc"--> to define a variable
<%
Const DB_CONNECT_STRI NG = "PROVIDER=MSDAS QL;XXXXXXXX%>
<script language="vbs">
set adocon=CreateOb ject("ADODB.Con nection")
'Set the connectionstrin g
adocon.Connecti onString =DB_CONNECT_STR ING
</script>
Any idea??
Comment