469,600 Members | 2,209 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,600 developers. It's quick & easy.

run and exit application

i'm very new to asp.net...
i'm facing problem since i want to run the application...

i put my connection string (strConnect) in a module (moduleConnect)
then when my first form load, i want to straight away connect to db.
so i write"moduleConnect.strConnect) in page_load like this:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
moduleConnect.strConnect()
End Sub

when i use datareader,
sqlCommand = New SqlCommand(queryString, moduleConnect.strConnect)
the "moduleConnect.strConnect" always wrong...... WHY? what should i
put?

by the way, i have 1 button to exit application.. in vb.net, i write
application.exit.... wat is the command in asp.net?
thx
regards,
kong
Nov 17 '05 #1
1 4995
CT
Hmm, I'm not sure if I follow you all the way.

So, you have a module with the strConnect variable declared as a String or
is it a method creating the connection string? Can you show us the code?

--
Carsten Thomsen
Enterprise Development with Visual Studio .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"kong" <ko********@yahoo.com> wrote in message
news:cc**************************@posting.google.c om...
i'm very new to asp.net...
i'm facing problem since i want to run the application...

i put my connection string (strConnect) in a module (moduleConnect)
then when my first form load, i want to straight away connect to db.
so i write"moduleConnect.strConnect) in page_load like this:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
moduleConnect.strConnect()
End Sub

when i use datareader,
sqlCommand = New SqlCommand(queryString, moduleConnect.strConnect)
the "moduleConnect.strConnect" always wrong...... WHY? what should i
put?

by the way, i have 1 button to exit application.. in vb.net, i write
application.exit.... wat is the command in asp.net?
thx
regards,
kong

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Guinness Mann | last post: by
11 posts views Thread by Peter Steele | last post: by
4 posts views Thread by Bob Day | last post: by
4 posts views Thread by JIM.H. | last post: by
1 post views Thread by =?Utf-8?B?VGFvZ2U=?= | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.