A slight addition:
To get the machine name use:
strThisMachine = Current.Request.ServerVariables("server_name")
-----Original Message-----
From: Karen Kungowski [mailto:[EMAIL PROTECTED]
Sent: woensdag 6 oktober 2004 5:10
To: [EMAIL PROTECTED]
Subject: Re: [AspNetAnyQuestionIsOk] Global.asax connection storage
I use this function in a .vb file to get the correct
connection string depending on whether it is running
on my development machine or is running on the
production server. Both strings are in Web.Config. (My
Machine's name is "LAPTOP", by they way):
Public Function fUseThisConnection(ByVal
strThisMachine As String) As String
If strThisMachine = "LAPTOP" Then
fUseThisConnection =
ConfigurationSettings.AppSettings("ConnectionStringHome")
Else
fUseThisConnection =
ConfigurationSettings.AppSettings("ConnectionStringMattsGarage")
End If
End Function
--- "Falls, Travis D (HTSC, CASD)"
<[EMAIL PROTECTED]> wrote:
>
> I am trying to retrieve my connectionString info
> from the web.config file at
> application startup. I have done it as follows:
> connectionString
>
=ConfigurationSettings.AppSettings.Get("DEV_RAFTLOG_ConnectionString");
>
> connectionString is defined as static protected
> String connectionString;
>
> I would like to then use this String in my
> application, how do I reference
> it? Or can't I?
>
> Travis D. Falls |Consultant, Raft.Net IT |
> 860.547.4070 |
> [EMAIL PROTECTED]
>
>
>
> -----Original Message-----
> From: Greg Ewing [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 04, 2004 2:15 PM
> To: [EMAIL PROTECTED]
> Subject: re: [AspNetAnyQuestionIsOk] includes
>
>
> Travis, do the includes include forms?� If they
> don't you can use a server
> side include just like you did with classic ASP.� If
> they each have their
> own forms then it's trickier.� Which do you have?
>
> Greg Ewing [MVP]
> www.citidc.com
>
> ----------------------------------------
> From: "Falls, Travis D (HTSC, CASD)"
> <[EMAIL PROTECTED]>
> Sent: Monday, October 04, 2004 11:09 AM
> To: "'[EMAIL PROTECTED]'"
> <[EMAIL PROTECTED]>
> Subject: [AspNetAnyQuestionIsOk] includes
>
> So I am racking my brain trying to figure out what
> is probably the stupidest
> question I have ever asked and I apologize for
> asking it. How can I include
> one aspx page in another. I have a header and footer
> in a shtml file. I
> want to do the same thing in my rewrite. I looked in
> my C# book; "Microsoft
> Visual C#.net Step By Step" but didn't see anything
> on includes.
>
> Travis D. Falls |Consultant, Raft.Net IT |
> 860.547.4070 |
> [EMAIL PROTECTED]
>
> This communication, including attachments, is for
> the exclusive use of
> addressee and may contain proprietary, confidential
> or privileged
> information. If you are not the intended recipient,
> any use, copying,
> disclosure, dissemination or distribution is
> strictly prohibited. If
> you are not the intended recipient, please notify
> the sender
> immediately by return email and delete this
> communication and destroy all
> copies.
>
>
> Yahoo! Groups Links
>
>
>
>
>
> [Non-text portions of this message have been
> removed]
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> $9.95 domain names from Yahoo!. Register anything.
>
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/saFolB/TM
>
--------------------------------------------------------------------~->
>
>
>
> Yahoo! Groups Links
>
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
>
> [EMAIL PROTECTED]
>
>
>
>
>
>
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/