C
Chad
Alright, I've been searching all over and it seems I'm just not looking
for the right thing, since what I want to do seems extremely simple I
just don't know the correct syntax. All I get is how to pass
information from a control in a .ascx to a control placeholder in the
html section. I don't want to do that.
The following example should explain what I want to do.
..ascx code:
<script runat="server">
Public strConnectString As String =
"server=SQLServer;trusted_connection=true;database=ADatabase"
</Script>
..aspx code:
<script runat="server">
Sub Page_Load
Conn = New SqlConnection(strConnectString)
End Sub
</script>
Basically I just want to use the strings I define in the .ascx in the
..aspx, the reason is I want a .ascx page that contains all
configuration info for every page I use, so that when I move a page to
a different server or if I switch databases I won't have to edit 8
pages just to change 10 or 11 lines of configuration settings.
Thanks to anyone that can help.
Chad
for the right thing, since what I want to do seems extremely simple I
just don't know the correct syntax. All I get is how to pass
information from a control in a .ascx to a control placeholder in the
html section. I don't want to do that.
The following example should explain what I want to do.
..ascx code:
<script runat="server">
Public strConnectString As String =
"server=SQLServer;trusted_connection=true;database=ADatabase"
</Script>
..aspx code:
<script runat="server">
Sub Page_Load
Conn = New SqlConnection(strConnectString)
End Sub
</script>
Basically I just want to use the strings I define in the .ascx in the
..aspx, the reason is I want a .ascx page that contains all
configuration info for every page I use, so that when I move a page to
a different server or if I switch databases I won't have to edit 8
pages just to change 10 or 11 lines of configuration settings.
Thanks to anyone that can help.
Chad