473,387 Members | 1,798 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,387 software developers and data experts.

Q: About how/where to store RecordSets in UserControls?

Sky
Basically, I'm stumped on how to translate something I wrote in PHP to
ASP.NET, and I'm having a hard time figuring out what is right way to do it
now...

The scenario in PHP was as follows:

I wrote a Discussion forum that worked client side via JScript that
initiated home-brew RPC calls in XML format (I wrote it pre-soap, or -- more
precisely -- before I knew about SOAP...) something like:
<rpc><command>GetChildren</command><msg_id>1478</msg_id></rpc>

Which was responded to with:
<recordset>
<record><Subject>aljfaslkfj</Subject><Msg>sdfasdfas</Msg></record>
<record><Subject>aljfaslkfj</Subject><Msg>sdfasdfas</Msg></record>
....
</recordset>

Upon receipt I used JScript to insertRow() and manipulate the layout...
As for editing/viewing single records, I simply hide the div that contained
the tree, and showed another div that I also dynamically filled in. Submit
was also done via XML.
Pretty straightforward trying to be Flash within HTML........ ;-)

Other than being a fun challenge of packing lots of JScript into 14k, the
benefit of such an approach was that no vars needed to be held in Session as
each XML call caused only one Query (Select * from Msgs where PID=@...) and
that was that.
The downside of couse was that if you F5, you recollapsed the tree.... But
all in all, it was pretty smooth, very little data on the wire so quick
response times, etc. The only tough part was the wiring across frames or div
hiding/displaying (I used both techniques) for the edit forms...But ok.

Now -- in ASP.NET - and please bear with me, I just started ASP.NET a couple
of months ago, and I'm still 'thinking' in PHP mode it seems, but I really
want to learn -- I'm tried to figure out how to handle this within the DNN
structure.

For one, if I use an EditForum.aspx on another page/url, and then return to
the forum, to not completly lose the layout of the tree, I have to either a)
Query recursively each time someone clicks a leaf to expand its children
(ie, 3 nodes down, we're talking about 3 queries in stead of 1) or b)hold a
proxy tree to which I append the new sub-query, then hold that proxy-tree in
Session or in memory, or in ViewState.

Saving it in ViewState sounds horrible as I would be burying the Client
under 30 records (visible) and 30 records (stuffed in ViewState). And that
was for a small set -- if I had a tree with 1, 1.5, 1.7, 1.5.3, 1.7.4 open,
then we're talking about 5 queries...Lots of time Querying, lots of time
serializing, lots of time and transfer size everywhere...

Saving it in Session via rerouting the ViewState to Session (I had read the
same article you referred to btw) sounds ok for about 200 users, but keel
over after that (100 users * 50k = 100Megs) because -- if I understand
correctly, DNN's Session data is in memory -- not transfered to file/DB) ...
I hadn't even realized that the session stuff was still in memory for
another 20 minutes or so, as your blog made clear!

Or manually saving it to a file by hand -- which (let alone the nightmare of
cleaning up after myself, creating unique names, etc) depends on the
security Write settings of the dir where DNN (the website portal system i am
attempting to write this for) was installed....

Anyway -- this all seems way too difficult to be the correct way to be
approaching this in ASP.NET, so I'm reaching out to see if you have a
suggestion on how to perceive the solution from ASP.NET eyes, to keep a
forum, with some child nodes opened, some not, and yet not require millions
of Queries to rehydrate the tree on each click...

Thanks!

Sky

Nov 18 '05 #1
2 1260
session is the .net solution. you can use sqlserver to store session or the
pagefile (100mb is really not that much).

-- bruce (sqlwork.com)

"Sky" <fo****@xact-solutions.com> wrote in message
news:#L**************@TK2MSFTNGP10.phx.gbl...
Basically, I'm stumped on how to translate something I wrote in PHP to
ASP.NET, and I'm having a hard time figuring out what is right way to do it now...

The scenario in PHP was as follows:

I wrote a Discussion forum that worked client side via JScript that
initiated home-brew RPC calls in XML format (I wrote it pre-soap, or -- more precisely -- before I knew about SOAP...) something like:
<rpc><command>GetChildren</command><msg_id>1478</msg_id></rpc>

Which was responded to with:
<recordset>
<record><Subject>aljfaslkfj</Subject><Msg>sdfasdfas</Msg></record>
<record><Subject>aljfaslkfj</Subject><Msg>sdfasdfas</Msg></record>
...
</recordset>

Upon receipt I used JScript to insertRow() and manipulate the layout...
As for editing/viewing single records, I simply hide the div that contained the tree, and showed another div that I also dynamically filled in. Submit
was also done via XML.
Pretty straightforward trying to be Flash within HTML........ ;-)

Other than being a fun challenge of packing lots of JScript into 14k, the
benefit of such an approach was that no vars needed to be held in Session as each XML call caused only one Query (Select * from Msgs where PID=@...) and that was that.
The downside of couse was that if you F5, you recollapsed the tree.... But
all in all, it was pretty smooth, very little data on the wire so quick
response times, etc. The only tough part was the wiring across frames or div hiding/displaying (I used both techniques) for the edit forms...But ok.

Now -- in ASP.NET - and please bear with me, I just started ASP.NET a couple of months ago, and I'm still 'thinking' in PHP mode it seems, but I really
want to learn -- I'm tried to figure out how to handle this within the DNN
structure.

For one, if I use an EditForum.aspx on another page/url, and then return to the forum, to not completly lose the layout of the tree, I have to either a) Query recursively each time someone clicks a leaf to expand its children
(ie, 3 nodes down, we're talking about 3 queries in stead of 1) or b)hold a proxy tree to which I append the new sub-query, then hold that proxy-tree in Session or in memory, or in ViewState.

Saving it in ViewState sounds horrible as I would be burying the Client
under 30 records (visible) and 30 records (stuffed in ViewState). And that
was for a small set -- if I had a tree with 1, 1.5, 1.7, 1.5.3, 1.7.4 open, then we're talking about 5 queries...Lots of time Querying, lots of time
serializing, lots of time and transfer size everywhere...

Saving it in Session via rerouting the ViewState to Session (I had read the same article you referred to btw) sounds ok for about 200 users, but keel
over after that (100 users * 50k = 100Megs) because -- if I understand
correctly, DNN's Session data is in memory -- not transfered to file/DB) .... I hadn't even realized that the session stuff was still in memory for
another 20 minutes or so, as your blog made clear!

Or manually saving it to a file by hand -- which (let alone the nightmare of cleaning up after myself, creating unique names, etc) depends on the
security Write settings of the dir where DNN (the website portal system i am attempting to write this for) was installed....

Anyway -- this all seems way too difficult to be the correct way to be
approaching this in ASP.NET, so I'm reaching out to see if you have a
suggestion on how to perceive the solution from ASP.NET eyes, to keep a
forum, with some child nodes opened, some not, and yet not require millions of Queries to rehydrate the tree on each click...

Thanks!

Sky

Nov 18 '05 #2
Sky
Thanks bruce.
One question: the module I am designing is suppossed to work within
DotNetNuke's framework -- and they don't cache the Session, and I don't want
to change their core code. Any other suggestions?
Sky

"bruce barker" <no***********@safeco.com> wrote in message
news:uT**************@tk2msftngp13.phx.gbl...
session is the .net solution. you can use sqlserver to store session or the pagefile (100mb is really not that much).

-- bruce (sqlwork.com)

"Sky" <fo****@xact-solutions.com> wrote in message
news:#L**************@TK2MSFTNGP10.phx.gbl...
Basically, I'm stumped on how to translate something I wrote in PHP to
ASP.NET, and I'm having a hard time figuring out what is right way to do it
now...

The scenario in PHP was as follows:

I wrote a Discussion forum that worked client side via JScript that
initiated home-brew RPC calls in XML format (I wrote it pre-soap, or --

more
precisely -- before I knew about SOAP...) something like:
<rpc><command>GetChildren</command><msg_id>1478</msg_id></rpc>

Which was responded to with:
<recordset>
<record><Subject>aljfaslkfj</Subject><Msg>sdfasdfas</Msg></record>
<record><Subject>aljfaslkfj</Subject><Msg>sdfasdfas</Msg></record>
...
</recordset>

Upon receipt I used JScript to insertRow() and manipulate the layout...
As for editing/viewing single records, I simply hide the div that

contained
the tree, and showed another div that I also dynamically filled in. Submit was also done via XML.
Pretty straightforward trying to be Flash within HTML........ ;-)

Other than being a fun challenge of packing lots of JScript into 14k, the benefit of such an approach was that no vars needed to be held in Session as
each XML call caused only one Query (Select * from Msgs where PID=@...) and
that was that.
The downside of couse was that if you F5, you recollapsed the tree....

But all in all, it was pretty smooth, very little data on the wire so quick
response times, etc. The only tough part was the wiring across frames or

div
hiding/displaying (I used both techniques) for the edit forms...But ok.

Now -- in ASP.NET - and please bear with me, I just started ASP.NET a

couple
of months ago, and I'm still 'thinking' in PHP mode it seems, but I really want to learn -- I'm tried to figure out how to handle this within the DNN structure.

For one, if I use an EditForum.aspx on another page/url, and then return

to
the forum, to not completly lose the layout of the tree, I have to either a)
Query recursively each time someone clicks a leaf to expand its
children (ie, 3 nodes down, we're talking about 3 queries in stead of 1) or b)hold a
proxy tree to which I append the new sub-query, then hold that
proxy-tree in
Session or in memory, or in ViewState.

Saving it in ViewState sounds horrible as I would be burying the Client
under 30 records (visible) and 30 records (stuffed in ViewState). And
that was for a small set -- if I had a tree with 1, 1.5, 1.7, 1.5.3, 1.7.4

open,
then we're talking about 5 queries...Lots of time Querying, lots of time
serializing, lots of time and transfer size everywhere...

Saving it in Session via rerouting the ViewState to Session (I had read

the
same article you referred to btw) sounds ok for about 200 users, but keel over after that (100 users * 50k = 100Megs) because -- if I understand
correctly, DNN's Session data is in memory -- not transfered to file/DB)

...
I hadn't even realized that the session stuff was still in memory for
another 20 minutes or so, as your blog made clear!

Or manually saving it to a file by hand -- which (let alone the

nightmare of
cleaning up after myself, creating unique names, etc) depends on the
security Write settings of the dir where DNN (the website portal system
i am
attempting to write this for) was installed....

Anyway -- this all seems way too difficult to be the correct way to be
approaching this in ASP.NET, so I'm reaching out to see if you have a
suggestion on how to perceive the solution from ASP.NET eyes, to keep a
forum, with some child nodes opened, some not, and yet not require

millions
of Queries to rehydrate the tree on each click...

Thanks!

Sky


Nov 18 '05 #3

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

Similar topics

1
by: Kate | last post by:
Hi: I have a picturebox control, and at runtime various usercontrols are added to it to make a diagram. As dynamically added usercontrols, they are of type VBExtender. Is there a way to save...
1
by: lakshmi | last post by:
Hi all, I recently rewrote a data intensive C++ program in C#. The C++ program was traversing 3 recordsets that were all open at the same time. I replaced those 3 recordsets with 3 .NET data...
2
by: N. Demos | last post by:
I have a user control with code behind of which two instances are created/declared in my aspx page. The aspx page has code behind also, as I need to access methods of the usercontrols on page...
3
by: YYZ | last post by:
I swear I've done my research, and now I was just hoping someone could explain this to me. I've got a base class (usercontrol) that I am using just as an interface. Meaning, I've defined...
3
by: b747_440 | last post by:
Dear Newsgroup, I'm an old VB6.0 developper who switched some time ago to VB.NET 2005. I really like that new Visual Studio. However, something is going wrong now and I can't figure out, what it...
3
by: Nathan Sokalski | last post by:
I have my UserControls in a subdirectory called usercontrols. In the code for one of my UserControls I have the following: Public Property adimage() As String Get Return...
4
by: rdemyan via AccessMonster.com | last post by:
Can someone help me with creating code that will look for DAO recordsets in modules and then check to see if the recordset is also closed in the module. All of my recordsets are of the form rs*...
8
by: chrisdavis | last post by:
I'm trying to filter by query or put those values in a distinct query in a where clause in some sort of list that it goes through but NOT at the same time. Example: ROW1 ROW2 ROW3 ROW4 ,...
4
by: Nathan Sokalski | last post by:
In several of my UserControls I add properties. If I access these properties in the CodeBehind of the pages that use the controls, I recieve an error when compiling. The reason for this is because...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.