Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

RE: FN-FORUM: .NET Global.asax

date posted 24th November 2005 11:31


Eureka!

Thanks for the help on the journey, I've now arrived.

The solution to my problem was to take the comparison of the
ServerVariables("SERVER_NAME"), which determined the DB Connection string,
out of the "Session Start" sub and put it in the "Application Start" sub. I
now have a perfectly formed DB Connection string in my Web Service and no
designer code:)

Thanks to Dawn and Andy:)

Regards,

Craig

(Now for the next battle, lol)
-----Original Message-----

Hi, You do need to have;

Imports System.Web
Imports System.Web.SessionState

Public Class Global
Inherits System.Web.HttpApplication

#Region " Component Designer Generated Code "

Public Sub New()
MyBase.New()

'This call is required by the Component Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Required by the Component Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Component Designer
'It can be modified using the Component Designer.
'Do not modify it using the code editor.
Private Sub
InitializeComponent()
components = New System.ComponentModel.Container()
End Sub

#End Region

End Class



If you don't have the Imports and Initializing then you'll be a bit
stuffed

And as Dawn's said, there's almost little point in writing all your code
in "classic ASP" style in the aspx page if you're using .NET. The whole
point of it is to be able to write "proper" code in code-behind.

Cheers
Andy






Messages by Day
November 30th 2005
November 29th 2005
November 28th 2005
November 27th 2005
November 26th 2005
November 25th 2005
November 24th 2005
November 23rd 2005
November 22nd 2005
November 21st 2005
November 20th 2005
November 19th 2005
November 18th 2005
November 17th 2005
November 16th 2005
November 15th 2005
November 14th 2005
November 13th 2005
November 12th 2005
November 11th 2005
November 10th 2005
November 9th 2005
November 8th 2005
November 7th 2005
November 6th 2005
November 5th 2005
November 4th 2005
November 3rd 2005
November 2nd 2005
November 1st 2005


Messages by Month
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000