473,404 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Object in session question

I'm on a project where the prevoius developer wrote code like below. I
thought stuff like this was bad? Isn't he putting a page into a session
object? And what we are trying to do is hit the db via a Stored Proc to
create a datatable in most cases. This seems like a waste to me. Is this good?

Public Shared Function getSQL(ByRef thePage As Page) As ProjectName.SQLServer

If thePage.Session("mySQLInit") = "1" Then

Return thePage.Session("mySQL")
End If

thePage.Session("mySQL") = New ProjectName.SQLServer
thePage.Session("mySQLInit") = "1"

Return thePage.Session("mySQL")
End Function

And then shoots to the SP to create datatable:

Sub FillDataGrid(ByRef gridData As System.Web.UI.WebControls.DataGrid, ByVal
SQL As String, Optional ByVal bAddNew As Boolean = False)

Dim cnn As SqlConnection = New
SqlConnection(ConfigurationSettings.AppSettings(). Item("ConnectionString"))

Dim dt As DataTable = New DataTable("")
Dim dr As DataRow

Dim objDA As SqlClient.SqlDataAdapter
objDA = New SqlClient.SqlDataAdapter

dt = ExecSQLReturnDT(SQL, objDA)

If bAddNew Then
dr = dt.NewRow
dt.Rows.InsertAt(dr, 0)
gridData.EditItemIndex = 0
End If

gridData.DataSource = dt
gridData.DataBind()

End Sub

And I see dozens of this:

page.Page.Session("psedit_PSHistoryID") = ""

Nov 19 '05 #1
7 1214
Chris wrote:
I'm on a project where the prevoius developer wrote code like below. I
thought stuff like this was bad? Isn't he putting a page into a session
object? And what we are trying to do is hit the db via a Stored Proc to
create a datatable in most cases. This seems like a waste to me. Is this good?

Public Shared Function getSQL(ByRef thePage As Page) As ProjectName.SQLServer

If thePage.Session("mySQLInit") = "1" Then

Return thePage.Session("mySQL")
End If

thePage.Session("mySQL") = New ProjectName.SQLServer
thePage.Session("mySQLInit") = "1"

Return thePage.Session("mySQL")
End Function

the "thePage" is a reference to some Page object. (I don't
think you need the "ByRef" keyword here though, you don't
need to pass the reference itself by reference)
This page is used to get at the session, where a
"ProjectName.SQLServer" object is stored/retrieved (whatever
that may be).

A different (better?) way to get at the session would
be through HttpContent.Current.Session.

And then shoots to the SP to create datatable:

Sub FillDataGrid(ByRef gridData As System.Web.UI.WebControls.DataGrid, ByVal
SQL As String, Optional ByVal bAddNew As Boolean = False)

Dim cnn As SqlConnection = New
SqlConnection(ConfigurationSettings.AppSettings(). Item("ConnectionString"))

Dim dt As DataTable = New DataTable("")
Dim dr As DataRow

Dim objDA As SqlClient.SqlDataAdapter
objDA = New SqlClient.SqlDataAdapter

dt = ExecSQLReturnDT(SQL, objDA)

If bAddNew Then
dr = dt.NewRow
dt.Rows.InsertAt(dr, 0)
gridData.EditItemIndex = 0
End If

gridData.DataSource = dt
gridData.DataBind()

End Sub

This DataTable is an internal structure, not a sql table.
One problem here could be that a complete sql-string is passed.
If you use values that are entered by users, then you could
be vulnerable to sql-injection attacks.

And I see dozens of this:

page.Page.Session("psedit_PSHistoryID") = ""


Again a roundabout way to get at the session. I don't
think the extra ".Page" is needed.
Is really an empty string what is wanted here? You can
also "Remove" items completely from the session.

--
Hans Kesting
Nov 19 '05 #2
I hate to embarass you, but no, he's not putting a Page into a Session
variable. If you just read the code, the Function takes a Page as a
parameter, and conditionally sets a Session variable for the Page's Session.
I wouldn't call it elegant, but I wouldn't call it wrong either, at least
without knowing what kind of class "ProjectName.SQLServer" is.

What exactly is your problem with this code? Using Session? It wouldn't be
in the CLR if Microsoft didn't think it was useful for something at least.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:9E**********************************@microsof t.com...
I'm on a project where the prevoius developer wrote code like below. I
thought stuff like this was bad? Isn't he putting a page into a session
object? And what we are trying to do is hit the db via a Stored Proc to
create a datatable in most cases. This seems like a waste to me. Is this
good?

Public Shared Function getSQL(ByRef thePage As Page) As
ProjectName.SQLServer

If thePage.Session("mySQLInit") = "1" Then

Return thePage.Session("mySQL")
End If

thePage.Session("mySQL") = New ProjectName.SQLServer
thePage.Session("mySQLInit") = "1"

Return thePage.Session("mySQL")
End Function

And then shoots to the SP to create datatable:

Sub FillDataGrid(ByRef gridData As System.Web.UI.WebControls.DataGrid,
ByVal
SQL As String, Optional ByVal bAddNew As Boolean = False)

Dim cnn As SqlConnection = New
SqlConnection(ConfigurationSettings.AppSettings(). Item("ConnectionString"))

Dim dt As DataTable = New DataTable("")
Dim dr As DataRow

Dim objDA As SqlClient.SqlDataAdapter
objDA = New SqlClient.SqlDataAdapter

dt = ExecSQLReturnDT(SQL, objDA)

If bAddNew Then
dr = dt.NewRow
dt.Rows.InsertAt(dr, 0)
gridData.EditItemIndex = 0
End If

gridData.DataSource = dt
gridData.DataBind()

End Sub

And I see dozens of this:

page.Page.Session("psedit_PSHistoryID") = ""

Nov 19 '05 #3
Chris,
Perhaps I misunderstood, but what do you see as the problem? Simply the use
of sessions? You said "isn't he putting a page into a session object?" not
sure what you mean by this, but no he isn't. He doesn't do
Session("CurrentPage") = Page ....

Sessions are bad only when used incorrectly. You haven't given us quite
enough scope to really pass judgement...I would guess that a lot of this
could probably be rewritten without sessions...and probably be better for it

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:9E**********************************@microsof t.com...
I'm on a project where the prevoius developer wrote code like below. I
thought stuff like this was bad? Isn't he putting a page into a session
object? And what we are trying to do is hit the db via a Stored Proc to
create a datatable in most cases. This seems like a waste to me. Is this good?
Public Shared Function getSQL(ByRef thePage As Page) As ProjectName.SQLServer
If thePage.Session("mySQLInit") = "1" Then

Return thePage.Session("mySQL")
End If

thePage.Session("mySQL") = New ProjectName.SQLServer
thePage.Session("mySQLInit") = "1"

Return thePage.Session("mySQL")
End Function

And then shoots to the SP to create datatable:

Sub FillDataGrid(ByRef gridData As System.Web.UI.WebControls.DataGrid, ByVal SQL As String, Optional ByVal bAddNew As Boolean = False)

Dim cnn As SqlConnection = New
SqlConnection(ConfigurationSettings.AppSettings(). Item("ConnectionString"))
Dim dt As DataTable = New DataTable("")
Dim dr As DataRow

Dim objDA As SqlClient.SqlDataAdapter
objDA = New SqlClient.SqlDataAdapter

dt = ExecSQLReturnDT(SQL, objDA)

If bAddNew Then
dr = dt.NewRow
dt.Rows.InsertAt(dr, 0)
gridData.EditItemIndex = 0
End If

gridData.DataSource = dt
gridData.DataBind()

End Sub

And I see dozens of this:

page.Page.Session("psedit_PSHistoryID") = ""

Nov 19 '05 #4
Well I have always used session values but have kept it to a select few. I
see in this app dozens upon dozens to control things as simple as a report
name on a single page. Setting and using them as <> "" and = "". Then I
thought that simple datagrid population could be improved using functions,
etc. but to pass the SQL statement around, etc. seemed over kill? I could be
wrong. And there is a view and SP for each activity, most occuring once (not
reused again in the app).
On a separate subject, I've been reading about keeping the logic in the
business layer and not using SP's. I wonder what the true loss in eff is?

Thanx everyone for the input. We learn something new everyday.

"Karl Seguin" wrote:
Chris,
Perhaps I misunderstood, but what do you see as the problem? Simply the use
of sessions? You said "isn't he putting a page into a session object?" not
sure what you mean by this, but no he isn't. He doesn't do
Session("CurrentPage") = Page ....

Sessions are bad only when used incorrectly. You haven't given us quite
enough scope to really pass judgement...I would guess that a lot of this
could probably be rewritten without sessions...and probably be better for it

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:9E**********************************@microsof t.com...
I'm on a project where the prevoius developer wrote code like below. I
thought stuff like this was bad? Isn't he putting a page into a session
object? And what we are trying to do is hit the db via a Stored Proc to
create a datatable in most cases. This seems like a waste to me. Is this

good?

Public Shared Function getSQL(ByRef thePage As Page) As

ProjectName.SQLServer

If thePage.Session("mySQLInit") = "1" Then

Return thePage.Session("mySQL")
End If

thePage.Session("mySQL") = New ProjectName.SQLServer
thePage.Session("mySQLInit") = "1"

Return thePage.Session("mySQL")
End Function

And then shoots to the SP to create datatable:

Sub FillDataGrid(ByRef gridData As System.Web.UI.WebControls.DataGrid,

ByVal
SQL As String, Optional ByVal bAddNew As Boolean = False)

Dim cnn As SqlConnection = New

SqlConnection(ConfigurationSettings.AppSettings(). Item("ConnectionString"))

Dim dt As DataTable = New DataTable("")
Dim dr As DataRow

Dim objDA As SqlClient.SqlDataAdapter
objDA = New SqlClient.SqlDataAdapter

dt = ExecSQLReturnDT(SQL, objDA)

If bAddNew Then
dr = dt.NewRow
dt.Rows.InsertAt(dr, 0)
gridData.EditItemIndex = 0
End If

gridData.DataSource = dt
gridData.DataBind()

End Sub

And I see dozens of this:

page.Page.Session("psedit_PSHistoryID") = ""


Nov 19 '05 #5
Again, the code you're describing is certainly not elegant. However, it does
work. As far as architecture is concerned, the architecture you described
can certainly use improvement. If you have the time, the inclination, and
the design skill, you could certainly rewrite the architecture in a much
better fashion. As for the details, if you ask here you'll get a plethora of
opinions. And as Uncle Chutney sez, "not only does everyone have one, but
they all stink." Your best bet would be to get a good hold of design
concepts and come up with your own (or leave well enough alone, it's up to
you).
On a separate subject, I've been reading about keeping the logic in the
business layer and not using SP's. I wonder what the true loss in eff is?
Sounds like an overdose of opinions. Your best information can be found in
the .Net SDK, which is a free download.from:

http://www.microsoft.com/downloads/d...displaylang=en

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com... Well I have always used session values but have kept it to a select few. I
see in this app dozens upon dozens to control things as simple as a report
name on a single page. Setting and using them as <> "" and = "". Then I
thought that simple datagrid population could be improved using functions,
etc. but to pass the SQL statement around, etc. seemed over kill? I could
be
wrong. And there is a view and SP for each activity, most occuring once
(not
reused again in the app).
On a separate subject, I've been reading about keeping the logic in the
business layer and not using SP's. I wonder what the true loss in eff is?

Thanx everyone for the input. We learn something new everyday.

"Karl Seguin" wrote:
Chris,
Perhaps I misunderstood, but what do you see as the problem? Simply the
use
of sessions? You said "isn't he putting a page into a session object?"
not
sure what you mean by this, but no he isn't. He doesn't do
Session("CurrentPage") = Page ....

Sessions are bad only when used incorrectly. You haven't given us quite
enough scope to really pass judgement...I would guess that a lot of this
could probably be rewritten without sessions...and probably be better for
it

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:9E**********************************@microsof t.com...
> I'm on a project where the prevoius developer wrote code like below. I
> thought stuff like this was bad? Isn't he putting a page into a session
> object? And what we are trying to do is hit the db via a Stored Proc to
> create a datatable in most cases. This seems like a waste to me. Is
> this

good?
>
> Public Shared Function getSQL(ByRef thePage As Page) As

ProjectName.SQLServer
>
> If thePage.Session("mySQLInit") = "1" Then
>
> Return thePage.Session("mySQL")
> End If
>
> thePage.Session("mySQL") = New ProjectName.SQLServer
> thePage.Session("mySQLInit") = "1"
>
> Return thePage.Session("mySQL")
> End Function
>
> And then shoots to the SP to create datatable:
>
> Sub FillDataGrid(ByRef gridData As System.Web.UI.WebControls.DataGrid,

ByVal
> SQL As String, Optional ByVal bAddNew As Boolean = False)
>
> Dim cnn As SqlConnection = New
>

SqlConnection(ConfigurationSettings.AppSettings(). Item("ConnectionString"))
>
> Dim dt As DataTable = New DataTable("")
> Dim dr As DataRow
>
> Dim objDA As SqlClient.SqlDataAdapter
> objDA = New SqlClient.SqlDataAdapter
>
> dt = ExecSQLReturnDT(SQL, objDA)
>
> If bAddNew Then
> dr = dt.NewRow
> dt.Rows.InsertAt(dr, 0)
> gridData.EditItemIndex = 0
> End If
>
> gridData.DataSource = dt
> gridData.DataBind()
>
> End Sub
>
> And I see dozens of this:
>
> page.Page.Session("psedit_PSHistoryID") = ""
>
>
>


Nov 19 '05 #6
note if you are using VS.NET the SDK is not needed, nor is it suggested you
install.

I think that listening to others opinion, help one form his own. Experience
is just as important as Education. I always say use the advise that you want
to use, that makes sense to you. No harm.

why point me to the SDK when this is more of a topic of design perference.
MS discusses both coding techniques. I was just curious as to what others do.
What MS suggests might not always be what is done. I like the idea of keeping
the code/logic on the page so you don't have to go on a hunt for it. Now what
performance hits this causes, I'm not sure. But if you code for a more
univerisal back-end then you don't have a choice.

thanx for your input.

"Kevin Spencer" wrote:
Again, the code you're describing is certainly not elegant. However, it does
work. As far as architecture is concerned, the architecture you described
can certainly use improvement. If you have the time, the inclination, and
the design skill, you could certainly rewrite the architecture in a much
better fashion. As for the details, if you ask here you'll get a plethora of
opinions. And as Uncle Chutney sez, "not only does everyone have one, but
they all stink." Your best bet would be to get a good hold of design
concepts and come up with your own (or leave well enough alone, it's up to
you).
On a separate subject, I've been reading about keeping the logic in the
business layer and not using SP's. I wonder what the true loss in eff is?


Sounds like an overdose of opinions. Your best information can be found in
the .Net SDK, which is a free download.from:

http://www.microsoft.com/downloads/d...displaylang=en

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
Well I have always used session values but have kept it to a select few. I
see in this app dozens upon dozens to control things as simple as a report
name on a single page. Setting and using them as <> "" and = "". Then I
thought that simple datagrid population could be improved using functions,
etc. but to pass the SQL statement around, etc. seemed over kill? I could
be
wrong. And there is a view and SP for each activity, most occuring once
(not
reused again in the app).
On a separate subject, I've been reading about keeping the logic in the
business layer and not using SP's. I wonder what the true loss in eff is?

Thanx everyone for the input. We learn something new everyday.

"Karl Seguin" wrote:
Chris,
Perhaps I misunderstood, but what do you see as the problem? Simply the
use
of sessions? You said "isn't he putting a page into a session object?"
not
sure what you mean by this, but no he isn't. He doesn't do
Session("CurrentPage") = Page ....

Sessions are bad only when used incorrectly. You haven't given us quite
enough scope to really pass judgement...I would guess that a lot of this
could probably be rewritten without sessions...and probably be better for
it

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:9E**********************************@microsof t.com...
> I'm on a project where the prevoius developer wrote code like below. I
> thought stuff like this was bad? Isn't he putting a page into a session
> object? And what we are trying to do is hit the db via a Stored Proc to
> create a datatable in most cases. This seems like a waste to me. Is
> this
good?
>
> Public Shared Function getSQL(ByRef thePage As Page) As
ProjectName.SQLServer
>
> If thePage.Session("mySQLInit") = "1" Then
>
> Return thePage.Session("mySQL")
> End If
>
> thePage.Session("mySQL") = New ProjectName.SQLServer
> thePage.Session("mySQLInit") = "1"
>
> Return thePage.Session("mySQL")
> End Function
>
> And then shoots to the SP to create datatable:
>
> Sub FillDataGrid(ByRef gridData As System.Web.UI.WebControls.DataGrid,
ByVal
> SQL As String, Optional ByVal bAddNew As Boolean = False)
>
> Dim cnn As SqlConnection = New
>
SqlConnection(ConfigurationSettings.AppSettings(). Item("ConnectionString"))
>
> Dim dt As DataTable = New DataTable("")
> Dim dr As DataRow
>
> Dim objDA As SqlClient.SqlDataAdapter
> objDA = New SqlClient.SqlDataAdapter
>
> dt = ExecSQLReturnDT(SQL, objDA)
>
> If bAddNew Then
> dr = dt.NewRow
> dt.Rows.InsertAt(dr, 0)
> gridData.EditItemIndex = 0
> End If
>
> gridData.DataSource = dt
> gridData.DataBind()
>
> End Sub
>
> And I see dozens of this:
>
> page.Page.Session("psedit_PSHistoryID") = ""
>
>
>


Nov 19 '05 #7
> note if you are using VS.NET the SDK is not needed, nor is it suggested
you
install.
I would have to disagree with this point. I have several versions of Visual
Studio, and I have the .Net SDK installed. I use it every day.
I think that listening to others opinion, help one form his own.
Experience
is just as important as Education. I always say use the advise that you
want
to use, that makes sense to you. No harm.
I would have to disagreee with this as well. Listening to others opinions
doesn't help anything. It only muddies the water. As Uncle Chutney sez
"Opinion is a poor substitute for fact." Not everything in the universe is a
matter of opinion. Some things, like technology, are matters of fact.

When I don't know something, I don't ask for opinions. I research.

Finally, if you follow others, you will never become better than those you
follow. And on the Internet, you have no idea who your mentors are. If you
teach yourself to teach yourself, you will fulfill your own potential to its
fullest.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:AB**********************************@microsof t.com... note if you are using VS.NET the SDK is not needed, nor is it suggested
you
install.

I think that listening to others opinion, help one form his own.
Experience
is just as important as Education. I always say use the advise that you
want
to use, that makes sense to you. No harm.

why point me to the SDK when this is more of a topic of design perference.
MS discusses both coding techniques. I was just curious as to what others
do.
What MS suggests might not always be what is done. I like the idea of
keeping
the code/logic on the page so you don't have to go on a hunt for it. Now
what
performance hits this causes, I'm not sure. But if you code for a more
univerisal back-end then you don't have a choice.

thanx for your input.

"Kevin Spencer" wrote:
Again, the code you're describing is certainly not elegant. However, it
does
work. As far as architecture is concerned, the architecture you described
can certainly use improvement. If you have the time, the inclination, and
the design skill, you could certainly rewrite the architecture in a much
better fashion. As for the details, if you ask here you'll get a plethora
of
opinions. And as Uncle Chutney sez, "not only does everyone have one, but
they all stink." Your best bet would be to get a good hold of design
concepts and come up with your own (or leave well enough alone, it's up
to
you).
> On a separate subject, I've been reading about keeping the logic in the
> business layer and not using SP's. I wonder what the true loss in eff
> is?


Sounds like an overdose of opinions. Your best information can be found
in
the .Net SDK, which is a free download.from:

http://www.microsoft.com/downloads/d...displaylang=en

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
> Well I have always used session values but have kept it to a select
> few. I
> see in this app dozens upon dozens to control things as simple as a
> report
> name on a single page. Setting and using them as <> "" and = "". Then
> I
> thought that simple datagrid population could be improved using
> functions,
> etc. but to pass the SQL statement around, etc. seemed over kill? I
> could
> be
> wrong. And there is a view and SP for each activity, most occuring once
> (not
> reused again in the app).
> On a separate subject, I've been reading about keeping the logic in the
> business layer and not using SP's. I wonder what the true loss in eff
> is?
>
> Thanx everyone for the input. We learn something new everyday.
>
> "Karl Seguin" wrote:
>
>> Chris,
>> Perhaps I misunderstood, but what do you see as the problem? Simply
>> the
>> use
>> of sessions? You said "isn't he putting a page into a session
>> object?"
>> not
>> sure what you mean by this, but no he isn't. He doesn't do
>> Session("CurrentPage") = Page ....
>>
>> Sessions are bad only when used incorrectly. You haven't given us
>> quite
>> enough scope to really pass judgement...I would guess that a lot of
>> this
>> could probably be rewritten without sessions...and probably be better
>> for
>> it
>>
>> Karl
>>
>> --
>> MY ASP.Net tutorials
>> http://www.openmymind.net/
>>
>>
>> "Chris" <Ch***@discussions.microsoft.com> wrote in message
>> news:9E**********************************@microsof t.com...
>> > I'm on a project where the prevoius developer wrote code like below.
>> > I
>> > thought stuff like this was bad? Isn't he putting a page into a
>> > session
>> > object? And what we are trying to do is hit the db via a Stored Proc
>> > to
>> > create a datatable in most cases. This seems like a waste to me. Is
>> > this
>> good?
>> >
>> > Public Shared Function getSQL(ByRef thePage As Page) As
>> ProjectName.SQLServer
>> >
>> > If thePage.Session("mySQLInit") = "1" Then
>> >
>> > Return thePage.Session("mySQL")
>> > End If
>> >
>> > thePage.Session("mySQL") = New ProjectName.SQLServer
>> > thePage.Session("mySQLInit") = "1"
>> >
>> > Return thePage.Session("mySQL")
>> > End Function
>> >
>> > And then shoots to the SP to create datatable:
>> >
>> > Sub FillDataGrid(ByRef gridData As
>> > System.Web.UI.WebControls.DataGrid,
>> ByVal
>> > SQL As String, Optional ByVal bAddNew As Boolean = False)
>> >
>> > Dim cnn As SqlConnection = New
>> >
>> SqlConnection(ConfigurationSettings.AppSettings(). Item("ConnectionString"))
>> >
>> > Dim dt As DataTable = New DataTable("")
>> > Dim dr As DataRow
>> >
>> > Dim objDA As SqlClient.SqlDataAdapter
>> > objDA = New SqlClient.SqlDataAdapter
>> >
>> > dt = ExecSQLReturnDT(SQL, objDA)
>> >
>> > If bAddNew Then
>> > dr = dt.NewRow
>> > dt.Rows.InsertAt(dr, 0)
>> > gridData.EditItemIndex = 0
>> > End If
>> >
>> > gridData.DataSource = dt
>> > gridData.DataBind()
>> >
>> > End Sub
>> >
>> > And I see dozens of this:
>> >
>> > page.Page.Session("psedit_PSHistoryID") = ""
>> >
>> >
>> >
>>
>>
>>


Nov 19 '05 #8

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

Similar topics

3
by: VijayShankar | last post by:
Can u be more specific on your question Anyway its not like Session variables are available for sometime and not available for sometime. When your session starts it is very much available...
26
by: Alan Silver | last post by:
Hello, I have a server running Windows Server 2003, on which two of the web sites use the MegaBBS ASP forum software. Both sites suddenly developed the same error, which seems to be connected to...
2
by: Colin Basterfield | last post by:
Hi, I am confused... I have the following code in my Page_Load method private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here
7
by: Nikhil Patel | last post by:
Hi all, I am using a Session object in my ASP.Net application to store a value of a Database field. I can access it as ... int iProposalId = Session; The session timeout is set to 20. Now my...
4
by: Tony | last post by:
how do I check if the data in the session object is null before extracting it. The following throws an error if the Session object has not already been created. string str =...
2
by: Markus Prediger | last post by:
Hi NG, I have an asp.net project that uses an vb6 com object for some database-manipulation (I cannot rewrite it in .net, sorry, its not my decision). I want it to be instanciated seperately...
3
by: MrShovel | last post by:
I'm new to this ASP.NET caper and have the following questions. I have a TestObject that contains about 50 fields of data and 3 member procedures. Below is a simplified explanation of what I do....
13
by: | last post by:
Simple question, I think... I'm storing an object in the Session object. In the code behind I read that object: trx = CType(Session("Transaction"), BOCSTransaction) If I change any...
12
by: Anthony Jones | last post by:
Here's a question that I've not been able to get a definitive answer to. Creating an STA object (such as a typical VB6 object) and assigning to the ASP Session store is a bad thing. It's a bad...
5
by: jamie.jamazon | last post by:
I'm currently developing a small MVC framework using classic ASP (don't ask me why!) At it's core it calls the controller script which does the heavy logic and builds disconnected recordsets of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.