473,857 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

New to Classes, please help.

Howdy,

I'm new to classes. Below is my class User. (is this a reserved namespace or
class?) It works great, kind of. If I specify the username and password, the
correct firstname and lastname are returned. For example, username dlozzi,
password fun. It returns David Lozzi as full name. If I login as someone
else on another computer, say username dsmith and password fun2, the second
computer displays the correct fullname. HOWEVER if I refresh the page on the
first computer where I logged in under dlozzi, the information is now
dsmith's info. I believe I am just missing one small piece, but I just
cannot find it. Should I be using Session states along with classes?

Thanks!

David Lozzi

Imports System.Configur ation
Imports System.Data.Sql Client
Public Class User
Private Shared sqlConn As String =
ConfigurationSe ttings.AppSetti ngs("Connection String")
Private Shared _firstname As String
Private Shared _lastname As String
Private Shared _username As String
Private Shared _password As String
Public Shared Function Login() As Boolean

_username = Replace(_userna me, "'", "''")
_password = Replace(_passwo rd, "'", "''")

Dim sqlQry As String = "cp_GetUser '" & _username & "'"

Dim myConnection As New SqlConnection(s qlConn)
myConnection.Op en()
Dim myCommand As New SqlCommand(sqlQ ry, myConnection)

Dim rec As SqlDataReader
rec = myCommand.Execu teReader()

If Not rec.Read Then
Login = False
Else
If _password = rec("strPasswor d") Then
_firstname = rec("strFirstNa me")
_lastname = rec("strLastNam e")
_password = "none"
Login = True
End If
End If
End Function

Public Shared Property FirstName() As String
Get
Return _firstname
End Get
Set(ByVal Value As String)
_firstname = Value
End Set
End Property

Public Shared Property LastName() As String
Get
Return _lastname
End Get
Set(ByVal Value As String)
_lastname = Value
End Set
End Property

Public Shared ReadOnly Property FullName() As String
Get
Return _firstname & " " & _lastname
End Get
End Property

Public Shared ReadOnly Property FullNameRev() As String
Get
Return _lastname & ", " & _firstname
End Get
End Property
Public Shared Property UserName() As String
Get
Return _username
End Get
Set(ByVal Value As String)
_username = Value
End Set
End Property

Public Shared Property Password() As String
Get
Return _password
End Get
Set(ByVal Value As String)
_password = Value
End Set
End Property
End Class
Nov 19 '05 #1
6 1587
David Lozzi wrote:
Howdy,

I'm new to classes. Below is my class User. (is this a reserved namespace or
class?) It works great, kind of. If I specify the username and password, the
correct firstname and lastname are returned. For example, username dlozzi,
password fun. It returns David Lozzi as full name. If I login as someone
else on another computer, say username dsmith and password fun2, the second
computer displays the correct fullname. HOWEVER if I refresh the page on the
first computer where I logged in under dlozzi, the information is now
dsmith's info. I believe I am just missing one small piece, but I just
cannot find it. Should I be using Session states along with classes?

Thanks!

Your problem is coming from all of your methods and properties being
shared. I'm not sure how to explain this without going all-out on OO
methodology... "shared" means there is only one of that thing for the class.

You're right to have the login method (method is an OO word for
procedure/function).

You want something like:

Public Class User
Private m_username As String

Public Sub New()
End Sub

Public Property Username() As String
Get
Return m_username
End Get
Set(ByVal value As String)
m_username = value
End Set
End Property

Public Shared Function Login(ByVal username As String) As User

Dim result As User
result = new User()
result.Username = username
return result

End Function
End Class
(I don't guarantee that the above will work because I just typed it out
in my newsreader. It should show you what needs to be done).

Now from whereever you're loging them in, you call the Login function to
get a User object. You can then store that User into the Session (say,
put it in Session("UserOb ject") or something like that.

--
Peter MacMillan
e-mail/msn: pe***@writeopen .com
icq: 1-874-927

GCS/IT/L d-(-)>-pu s():(-) a- C+++(++++)>$ UL>$ P++ L+ E-(-) W++(+++)>$
N o w++>$ O !M- V PS PE Y+ t++ 5 X R* tv- b++(+) DI D+(++)>$ G e++ h r--
y(--)
Nov 19 '05 #2
As David is "new to classes," I thought I'd follow up your excellent advice
with a bit of more detailed information about classes.

A class is a data type, just as an integer or a string. A data type
specifies both the type of data stored in an instance of that type, as well
as the amount of memory necessary to allocate to store that type of data. An
Integer, for example, is a 32-bit storage space that contains an integer
value (remember that underneath it all it's just 1s and 0s). A string is a
pointer to an array of characters. Note that an array is also a data type,
as well as a pointer. A pointer is the address in memory of the object being
pointed to. It is the size of a memory address.

Structures were clreated before classes. A structure is an aggregate data
type (like an array), which can contain multiple data types in a single
storage space. A simple structure, for example, could contain an integer and
a string. The size of the structure would be 32-bits plus the size of the
pointer to the string. A structure can also have process. That is, you can
make a function a member of a structure. So, you can see by now that a
structure is a primitve class of sorts.

With the advnet of OOP, classes were created. Classes are basically
structures, but have additional properties, such as Inheritance,
Encapsulation, Polymorphism and Abstraction. For example, a class can have
private or public members (plus several others). Private class members
cannnot be accessed outside the class. Inheritance gives you the ability to
EXTEND a class with an inherited class. By using Inheritance, all the
characteristics of the base class are automatically attributed to the
inherited class, which can extend the base class with additional properties
or functionality.

As to Shared classes and members: A program has 2 basic memory areas: The
stack and the heap. The heap is where all the code for the program is loaded
when the program starts. In a sense, it is an in-memory copy of the program,
and all of its process and data. It is a single "instance" if you will, of
all the code. As the program runs, functions are called. Ordinarily, a copy
("instance") of the function is placed on top of the stack, where it remains
until the function returns. However, a static method or piece of data is not
instantiated. A copy is not placed on the stack every time the method is
called. Instead, the single "copy" in the heap is used. that single copy is
used by all aspects of the program. As there is only one (hence
"singleton" ), it is not thread-safe. In a sense, it is "shared" by all
functions that call it.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"Peter MacMillan" <pe***@writeope n.com> wrote in message
news:A5******** ************@ro gers.com...
David Lozzi wrote:
Howdy,

I'm new to classes. Below is my class User. (is this a reserved namespace
or class?) It works great, kind of. If I specify the username and
password, the correct firstname and lastname are returned. For example,
username dlozzi, password fun. It returns David Lozzi as full name. If I
login as someone else on another computer, say username dsmith and
password fun2, the second computer displays the correct fullname. HOWEVER
if I refresh the page on the first computer where I logged in under
dlozzi, the information is now dsmith's info. I believe I am just missing
one small piece, but I just cannot find it. Should I be using Session
states along with classes?

Thanks!

Your problem is coming from all of your methods and properties being
shared. I'm not sure how to explain this without going all-out on OO
methodology... "shared" means there is only one of that thing for the
class.

You're right to have the login method (method is an OO word for
procedure/function).

You want something like:

Public Class User
Private m_username As String

Public Sub New()
End Sub

Public Property Username() As String
Get
Return m_username
End Get
Set(ByVal value As String)
m_username = value
End Set
End Property

Public Shared Function Login(ByVal username As String) As User

Dim result As User
result = new User()
result.Username = username
return result

End Function
End Class
(I don't guarantee that the above will work because I just typed it out in
my newsreader. It should show you what needs to be done).

Now from whereever you're loging them in, you call the Login function to
get a User object. You can then store that User into the Session (say, put
it in Session("UserOb ject") or something like that.

--
Peter MacMillan
e-mail/msn: pe***@writeopen .com icq: 1-874-927

GCS/IT/L d-(-)>-pu s():(-) a- C+++(++++)>$ UL>$ P++ L+ E-(-) W++(+++)>$ N
o w++>$ O !M- V PS PE Y+ t++ 5 X R* tv- b++(+) DI D+(++)>$ G e++ h r--
y(--)

Nov 19 '05 #3
Thank you for the explanation. That clears things up a bit ;)

Thanks,

David Lozzi
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
As David is "new to classes," I thought I'd follow up your excellent
advice with a bit of more detailed information about classes.

A class is a data type, just as an integer or a string. A data type
specifies both the type of data stored in an instance of that type, as
well as the amount of memory necessary to allocate to store that type of
data. An Integer, for example, is a 32-bit storage space that contains an
integer value (remember that underneath it all it's just 1s and 0s). A
string is a pointer to an array of characters. Note that an array is also
a data type, as well as a pointer. A pointer is the address in memory of
the object being pointed to. It is the size of a memory address.

Structures were clreated before classes. A structure is an aggregate data
type (like an array), which can contain multiple data types in a single
storage space. A simple structure, for example, could contain an integer
and a string. The size of the structure would be 32-bits plus the size of
the pointer to the string. A structure can also have process. That is, you
can make a function a member of a structure. So, you can see by now that a
structure is a primitve class of sorts.

With the advnet of OOP, classes were created. Classes are basically
structures, but have additional properties, such as Inheritance,
Encapsulation, Polymorphism and Abstraction. For example, a class can have
private or public members (plus several others). Private class members
cannnot be accessed outside the class. Inheritance gives you the ability
to EXTEND a class with an inherited class. By using Inheritance, all the
characteristics of the base class are automatically attributed to the
inherited class, which can extend the base class with additional
properties or functionality.

As to Shared classes and members: A program has 2 basic memory areas: The
stack and the heap. The heap is where all the code for the program is
loaded when the program starts. In a sense, it is an in-memory copy of the
program, and all of its process and data. It is a single "instance" if you
will, of all the code. As the program runs, functions are called.
Ordinarily, a copy ("instance") of the function is placed on top of the
stack, where it remains until the function returns. However, a static
method or piece of data is not instantiated. A copy is not placed on the
stack every time the method is called. Instead, the single "copy" in the
heap is used. that single copy is used by all aspects of the program. As
there is only one (hence "singleton" ), it is not thread-safe. In a sense,
it is "shared" by all functions that call it.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
What You Seek Is What You Get.
"Peter MacMillan" <pe***@writeope n.com> wrote in message
news:A5******** ************@ro gers.com...
David Lozzi wrote:
Howdy,

I'm new to classes. Below is my class User. (is this a reserved
namespace or class?) It works great, kind of. If I specify the username
and password, the correct firstname and lastname are returned. For
example, username dlozzi, password fun. It returns David Lozzi as full
name. If I login as someone else on another computer, say username
dsmith and password fun2, the second computer displays the correct
fullname. HOWEVER if I refresh the page on the first computer where I
logged in under dlozzi, the information is now dsmith's info. I believe
I am just missing one small piece, but I just cannot find it. Should I
be using Session states along with classes?

Thanks!

Your problem is coming from all of your methods and properties being
shared. I'm not sure how to explain this without going all-out on OO
methodology... "shared" means there is only one of that thing for the
class.

You're right to have the login method (method is an OO word for
procedure/function).

You want something like:

Public Class User
Private m_username As String

Public Sub New()
End Sub

Public Property Username() As String
Get
Return m_username
End Get
Set(ByVal value As String)
m_username = value
End Set
End Property

Public Shared Function Login(ByVal username As String) As User

Dim result As User
result = new User()
result.Username = username
return result

End Function
End Class
(I don't guarantee that the above will work because I just typed it out
in my newsreader. It should show you what needs to be done).

Now from whereever you're loging them in, you call the Login function to
get a User object. You can then store that User into the Session (say,
put it in Session("UserOb ject") or something like that.

--
Peter MacMillan
e-mail/msn: pe***@writeopen .com icq: 1-874-927

GCS/IT/L d-(-)>-pu s():(-) a- C+++(++++)>$ UL>$ P++ L+ E-(-) W++(+++)>$ N
o w++>$ O !M- V PS PE Y+ t++ 5 X R* tv- b++(+) DI D+(++)>$ G e++ h r--
y(--)


Nov 19 '05 #4
Hmm.. OK.

I'm following you for the most part in your sample, but once it is in the
Session var, how do I reference it again somewhere else?

Thanks,

David Lozzi
"Peter MacMillan" <pe***@writeope n.com> wrote in message
news:A5******** ************@ro gers.com...
David Lozzi wrote:
Howdy,

I'm new to classes. Below is my class User. (is this a reserved namespace
or class?) It works great, kind of. If I specify the username and
password, the correct firstname and lastname are returned. For example,
username dlozzi, password fun. It returns David Lozzi as full name. If I
login as someone else on another computer, say username dsmith and
password fun2, the second computer displays the correct fullname. HOWEVER
if I refresh the page on the first computer where I logged in under
dlozzi, the information is now dsmith's info. I believe I am just missing
one small piece, but I just cannot find it. Should I be using Session
states along with classes?

Thanks!

Your problem is coming from all of your methods and properties being
shared. I'm not sure how to explain this without going all-out on OO
methodology... "shared" means there is only one of that thing for the
class.

You're right to have the login method (method is an OO word for
procedure/function).

You want something like:

Public Class User
Private m_username As String

Public Sub New()
End Sub

Public Property Username() As String
Get
Return m_username
End Get
Set(ByVal value As String)
m_username = value
End Set
End Property

Public Shared Function Login(ByVal username As String) As User

Dim result As User
result = new User()
result.Username = username
return result

End Function
End Class
(I don't guarantee that the above will work because I just typed it out in
my newsreader. It should show you what needs to be done).

Now from whereever you're loging them in, you call the Login function to
get a User object. You can then store that User into the Session (say, put
it in Session("UserOb ject") or something like that.

--
Peter MacMillan
e-mail/msn: pe***@writeopen .com icq: 1-874-927

GCS/IT/L d-(-)>-pu s():(-) a- C+++(++++)>$ UL>$ P++ L+ E-(-) W++(+++)>$ N
o w++>$ O !M- V PS PE Y+ t++ 5 X R* tv- b++(+) DI D+(++)>$ G e++ h r--
y(--)

Nov 19 '05 #5
OK, so i think i got it. My code is below. It appears to work great, the
user object is saved in the user's session state. Check out the code for
home.aspx. Will I have to thos first 2 lines every time? Can a class pull
data from a session automatically, so all i would have to do is Imports
app.User and then in my script just call the FullName property? Know what I
mean?
*****
in User.vb
Imports System.Configur ation
Imports System.Data.Sql Client
Public Class User
Private sqlConn As String =
ConfigurationSe ttings.AppSetti ngs("Connection String")
Private _firstname As String
Private _lastname As String
Private _username As String
Private _password As String
Public Function Login() As Boolean

_username = Replace(_userna me, "'", "''")
_password = Replace(_passwo rd, "'", "''")

Dim sqlQry As String = "cp_GetUser '" & _username & "'"

Dim myConnection As New SqlConnection(s qlConn)
myConnection.Op en()
Dim myCommand As New SqlCommand(sqlQ ry, myConnection)

Dim rec As SqlDataReader
rec = myCommand.Execu teReader()

If Not rec.Read Then
Login = False
Else
If _password = rec("strPasswor d") Then
_firstname = rec("strFirstNa me")
_lastname = rec("strLastNam e")
_password = "none"
Login = True
End If
End If
End Function

Public Property FirstName() As String
Get
Return _firstname
End Get
Set(ByVal Value As String)
_firstname = Value
End Set
End Property

Public Sub New()

End Sub

Public Property LastName() As String
Get
Return _lastname
End Get
Set(ByVal Value As String)
_lastname = Value
End Set
End Property

Public ReadOnly Property FullName() As String
Get
Return _firstname & " " & _lastname
End Get
End Property

Public ReadOnly Property FullNameRev() As String
Get
Return _lastname & ", " & _firstname
End Get
End Property
Public Property UserName() As String
Get
Return _username
End Get
Set(ByVal Value As String)
_username = Value
End Set
End Property

Public Property Password() As String
Get
Return _password
End Get
Set(ByVal Value As String)
_password = Value
End Set
End Property
End Class

*****
in default.aspx
Dim usr As New User
usr.UserName = txtusername.Tex t
usr.Password = txtpassword.Tex t

If Not usr.Login() Then
lblStatus.Text = "Unsuccessf ul. Please try again.<br>" &
usr.UserName
Else
Session("UserOb j") = usr
Response.Redire ct("home.aspx" )
End If

*****
in home.aspx
1 Dim usr As User
2 usr = Session("UserOb j")
3 lblStatus.Text = "Welcome " & usr.FullName & "<br>Fullnamere v " &
usr.FullNameRev

Thanks!!


"David Lozzi" <dlozzi@(remove )delphi-ts.com> wrote in message
news:OW******** ******@TK2MSFTN GP09.phx.gbl...
Hmm.. OK.

I'm following you for the most part in your sample, but once it is in the
Session var, how do I reference it again somewhere else?

Thanks,

David Lozzi
"Peter MacMillan" <pe***@writeope n.com> wrote in message
news:A5******** ************@ro gers.com...
David Lozzi wrote:
Howdy,

I'm new to classes. Below is my class User. (is this a reserved
namespace or class?) It works great, kind of. If I specify the username
and password, the correct firstname and lastname are returned. For
example, username dlozzi, password fun. It returns David Lozzi as full
name. If I login as someone else on another computer, say username
dsmith and password fun2, the second computer displays the correct
fullname. HOWEVER if I refresh the page on the first computer where I
logged in under dlozzi, the information is now dsmith's info. I believe
I am just missing one small piece, but I just cannot find it. Should I
be using Session states along with classes?

Thanks!

Your problem is coming from all of your methods and properties being
shared. I'm not sure how to explain this without going all-out on OO
methodology... "shared" means there is only one of that thing for the
class.

You're right to have the login method (method is an OO word for
procedure/function).

You want something like:

Public Class User
Private m_username As String

Public Sub New()
End Sub

Public Property Username() As String
Get
Return m_username
End Get
Set(ByVal value As String)
m_username = value
End Set
End Property

Public Shared Function Login(ByVal username As String) As User

Dim result As User
result = new User()
result.Username = username
return result

End Function
End Class
(I don't guarantee that the above will work because I just typed it out
in my newsreader. It should show you what needs to be done).

Now from whereever you're loging them in, you call the Login function to
get a User object. You can then store that User into the Session (say,
put it in Session("UserOb ject") or something like that.

--
Peter MacMillan
e-mail/msn: pe***@writeopen .com icq: 1-874-927

GCS/IT/L d-(-)>-pu s():(-) a- C+++(++++)>$ UL>$ P++ L+ E-(-) W++(+++)>$ N
o w++>$ O !M- V PS PE Y+ t++ 5 X R* tv- b++(+) DI D+(++)>$ G e++ h r--
y(--)


Nov 19 '05 #6
If I were you, I'd close my Connection before I'd look at anything else.
Next, I'd turn Option Strict ON. Then I'd fix all of the exceptions that
turning Option Strict ON will raise.

And remember that classes are not magic, or anything strange to you. They
are simply containers for process and data. So, for example, when you ask -
Can a class pull data from a session automatically, so all i would have to
do is Imports app.User and then in my script just call the FullName
property? Know what I mean?
Keep in mind that a class is just code, encapsulated in a class definition.
It can do anything that any other code can do.

Keep studying. "Imports" is a pre-processor declaration that is useful for
the developer, to prevent the developer from having to type the full
namespace every time something in that namespace is used. At run-time, it
does nothing.

One last piece of advice: When somebody gives you code, do yourself a favor
and don't use it until you understand it fully. Why? Well, for one thing,
the next time you need similar code you can write it yourself. It enhances
your skillset. And you wouldn't eat something that some stranger on the
street gave you, would you? It might be bad. So, it's not a good idea for
your program to eat code that somebody gave you off the street without your
understanding what it does, and what it might do that it should not. There's
a lot of bad code floating around out there.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"David Lozzi" <dlozzi@(remove )delphi-ts.com> wrote in message
news:eI******** ******@TK2MSFTN GP15.phx.gbl... OK, so i think i got it. My code is below. It appears to work great, the
user object is saved in the user's session state. Check out the code for
home.aspx. Will I have to thos first 2 lines every time? Can a class pull
data from a session automatically, so all i would have to do is Imports
app.User and then in my script just call the FullName property? Know what
I mean?
*****
in User.vb
Imports System.Configur ation
Imports System.Data.Sql Client
Public Class User
Private sqlConn As String =
ConfigurationSe ttings.AppSetti ngs("Connection String")
Private _firstname As String
Private _lastname As String
Private _username As String
Private _password As String
Public Function Login() As Boolean

_username = Replace(_userna me, "'", "''")
_password = Replace(_passwo rd, "'", "''")

Dim sqlQry As String = "cp_GetUser '" & _username & "'"

Dim myConnection As New SqlConnection(s qlConn)
myConnection.Op en()
Dim myCommand As New SqlCommand(sqlQ ry, myConnection)

Dim rec As SqlDataReader
rec = myCommand.Execu teReader()

If Not rec.Read Then
Login = False
Else
If _password = rec("strPasswor d") Then
_firstname = rec("strFirstNa me")
_lastname = rec("strLastNam e")
_password = "none"
Login = True
End If
End If
End Function

Public Property FirstName() As String
Get
Return _firstname
End Get
Set(ByVal Value As String)
_firstname = Value
End Set
End Property

Public Sub New()

End Sub

Public Property LastName() As String
Get
Return _lastname
End Get
Set(ByVal Value As String)
_lastname = Value
End Set
End Property

Public ReadOnly Property FullName() As String
Get
Return _firstname & " " & _lastname
End Get
End Property

Public ReadOnly Property FullNameRev() As String
Get
Return _lastname & ", " & _firstname
End Get
End Property
Public Property UserName() As String
Get
Return _username
End Get
Set(ByVal Value As String)
_username = Value
End Set
End Property

Public Property Password() As String
Get
Return _password
End Get
Set(ByVal Value As String)
_password = Value
End Set
End Property
End Class

*****
in default.aspx
Dim usr As New User
usr.UserName = txtusername.Tex t
usr.Password = txtpassword.Tex t

If Not usr.Login() Then
lblStatus.Text = "Unsuccessf ul. Please try again.<br>" &
usr.UserName
Else
Session("UserOb j") = usr
Response.Redire ct("home.aspx" )
End If

*****
in home.aspx
1 Dim usr As User
2 usr = Session("UserOb j")
3 lblStatus.Text = "Welcome " & usr.FullName & "<br>Fullnamere v " &
usr.FullNameRev

Thanks!!


"David Lozzi" <dlozzi@(remove )delphi-ts.com> wrote in message
news:OW******** ******@TK2MSFTN GP09.phx.gbl...
Hmm.. OK.

I'm following you for the most part in your sample, but once it is in the
Session var, how do I reference it again somewhere else?

Thanks,

David Lozzi
"Peter MacMillan" <pe***@writeope n.com> wrote in message
news:A5******** ************@ro gers.com...
David Lozzi wrote:
Howdy,

I'm new to classes. Below is my class User. (is this a reserved
namespace or class?) It works great, kind of. If I specify the username
and password, the correct firstname and lastname are returned. For
example, username dlozzi, password fun. It returns David Lozzi as full
name. If I login as someone else on another computer, say username
dsmith and password fun2, the second computer displays the correct
fullname. HOWEVER if I refresh the page on the first computer where I
logged in under dlozzi, the information is now dsmith's info. I believe
I am just missing one small piece, but I just cannot find it. Should I
be using Session states along with classes?

Thanks!

Your problem is coming from all of your methods and properties being
shared. I'm not sure how to explain this without going all-out on OO
methodology... "shared" means there is only one of that thing for the
class.

You're right to have the login method (method is an OO word for
procedure/function).

You want something like:

Public Class User
Private m_username As String

Public Sub New()
End Sub

Public Property Username() As String
Get
Return m_username
End Get
Set(ByVal value As String)
m_username = value
End Set
End Property

Public Shared Function Login(ByVal username As String) As User

Dim result As User
result = new User()
result.Username = username
return result

End Function
End Class
(I don't guarantee that the above will work because I just typed it out
in my newsreader. It should show you what needs to be done).

Now from whereever you're loging them in, you call the Login function to
get a User object. You can then store that User into the Session (say,
put it in Session("UserOb ject") or something like that.

--
Peter MacMillan
e-mail/msn: pe***@writeopen .com icq: 1-874-927

GCS/IT/L d-(-)>-pu s():(-) a- C+++(++++)>$ UL>$ P++ L+ E-(-) W++(+++)>$
N o w++>$ O !M- V PS PE Y+ t++ 5 X R* tv- b++(+) DI D+(++)>$ G e++ h r--
y(--)



Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1658
by: todd | last post by:
Im tring to learn about classes with php. I've read alot of posts here and look at other peoples code. So I appied all the absorbed to this. Im tring to build a Shopping cart. not for live use but just to learn about classes and get better at php. Anyway, i put this code together and can't get it to work. it may be comletely wrong and if it is please direct me to a good tutorial. But at the risk of looking like a complete ass. here is my...
3
3471
by: Logan K. | last post by:
What is a PHP class? I've seen a lot of talk about these and how they can help you out, but I've never seen a very good explanation. I've been working with PHP for just over 6 months and usually hard code everything into my scripts. Recently I've begun putting frequently-used things (like my MySQL connect function) in a seperate file and including them. But I still haven't seen the use of classes or even functions for that matter. And one...
1
1356
by: Jose Michael Meo R. Barrido | last post by:
Happy New Year! How i list or enumerate classes (names of classes in string format) from a certain namespace? please help.
7
1813
by: verbatime | last post by:
Please explain me how this works - or should work: Got my two classes - bcBasic (baseclass) and the derived cBasic. //--------------------------------------- class bcBasic { int number; virtual long myfunc(void); }
6
2707
by: Robert | last post by:
Hello. I have been trying out the Lebans ToolTip Classes at http://www.lebans.com/tooltip.htm, to display "balloon" style help tips in a form. The classes I am using are located at http://www.lebans.com/DownloadFiles/A2kTooltip.zip So far the classes work perfectly, except that now I need to extend it to support other controls besides the ones given in the example form. I have gotten it to work with some controls, but not others. I...
5
3490
by: Benne Smith | last post by:
Hi, I have three enviroments; a development, a testing and a production enviroment. I'm making a big application (.exe), which uses alot of different webservices. I don't use the webservices by adding a WebReference, since it does not allow me to keep state (cookiecontainer) or to specify functions on the classes (like if i want to override the ToString() function on a class from my webservice). So the only way i can see how i can get...
7
8441
by: Carolyn Vo | last post by:
Hi, How can I call Java classes from C# code? I've seen the call in ASP ("NewJavaObject"), so I'm sure that I can do something similar in C# code. Please please please help, thanks!!!
10
2452
by: ptass | last post by:
Hi In asp.net 2.0 an aspx files .cs file is a partial class and all works fine, however, I thought I’d be able to create another class file, call it a partial class and have that compile and load as a 3rd partial class. This would be handy so i can generate standard code into one of the partial classes, while having my custom code untouched
45
3045
by: =?Utf-8?B?QmV0aA==?= | last post by:
Hello. I'm trying to find another way to share an instance of an object with other classes. I started by passing the instance to the other class's constructor, like this: Friend Class clsData Private m_objSQLClient As clsSQLClient Private m_objUsers As clsUsers
0
9767
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10711
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10807
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9549
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7104
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5774
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5967
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4190
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.