Showing posts with label items. Show all posts
Showing posts with label items. Show all posts

Monday, March 26, 2012

Suggestion

Hello,

I am working on a e-commerce application, which should
allows me to add three values each time I add the items to
the basket. Now I wonder where and how I should store
these values so that I can reuse them in the next screen?

Please advise me.Two options that come to mind are in a database, and in the Session
object. Which one you pick really depends on the requirements of your
application. For instance, if you want a user to be able to add three
items to the shopping cart and come back three days later, you'll need
a persistant data store like a database.

You might want to check out the source code to the Commerce Starter
Kit: http://asp.net/Default.aspx?tabindex=8&tabid=47 This is a
learning tool and will give you some implementation ideas.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 15 Dec 2004 16:42:07 -0800, "Vishal"
<anonymous@.discussions.microsoft.com> wrote:

>Hello,
> I am working on a e-commerce application, which should
>allows me to add three values each time I add the items to
>the basket. Now I wonder where and how I should store
>these values so that I can reuse them in the next screen?
>Please advise me.

Suggestion

Hello,
I am working on a e-commerce application, which should
allows me to add three values each time I add the items to
the basket. Now I wonder where and how I should store
these values so that I can reuse them in the next screen?
Please advise me.Two options that come to mind are in a database, and in the Session
object. Which one you pick really depends on the requirements of your
application. For instance, if you want a user to be able to add three
items to the shopping cart and come back three days later, you'll need
a persistant data store like a database.
You might want to check out the source code to the Commerce Starter
Kit: http://asp.net/Default.aspx?tabindex=8&tabid=47 This is a
learning tool and will give you some implementation ideas.
Scott
http://www.OdeToCode.com/blogs/scott/
On Wed, 15 Dec 2004 16:42:07 -0800, "Vishal"
<anonymous@.discussions.microsoft.com> wrote:

>Hello,
> I am working on a e-commerce application, which should
>allows me to add three values each time I add the items to
>the basket. Now I wonder where and how I should store
>these values so that I can reuse them in the next screen?
>Please advise me.

Suggestion on shopping cart and sessions

Hi,
I am working on implementing a shopping cart. I am planning to storethe shopping cart items in a database table. A shoppingcartid will beused to distinguish between different shopping carts. Theshoppingcartid for members will be their userid, for others it will bea guid. I am planning to store the shoppingcartid in a sessionvariable. We don't have a webfarm, just one server machine. I amthinking of using session with InProc mode.
But I have read many posts complaining of expired sessions, sessiontimeouts, session_end not fired etc. Is it ok to use sessions to storethe cartid or is there any better solution?
Thanks.

If your serious and in a hurry, SQL Server is the easy way. the other options are to write your own or use another server.

There is no session end when running SQL Server session


You said 'to write your own'. Can you please ecplain more on that. Thanks.

Sadly, time does not permit, but have a look at this - it should help

http://www.codeproject.com/aspnet/StateHijack.asp


Thanks.
Can any one tell me is there any major downside of using cookies tostore the cartid instead of sessions? I think there will be moreabondoned carts than when using sessions. But I am not concerned aboutthat.
I think may be you could use a temp table to store your data,you can delete the expired data automaticlly

hello.

or maybe you should consider taking a look at profiles.


I am not using ASP.Net 2.0 I cannot use profiles.

Saturday, March 24, 2012

Sum a Datagrid row?

Hello all,

I have a datagrid that returns sales of items by month from an Oracle
table using a datareader like so:

Item |Jan |Feb | ... |Dec
itm1 |10 |5 | ... |6
itm2 |7 |2 | ... |8

I want to add a column to the end of the datagrid that would sum the
row:
Item |Jan |Feb | ... |Dec |Total
itm1 |10 |5 | ... |6 |21
itm2 |7 |2 | ... |8 |17

I would think that this would be easy to do, but I can only find
articles that explain how sum a column into a footer. Could someone
point me in the right direction? I've only been programming in
asp.net for about four months now, so the help is appreciated.Use the binding event of the Grid view (or DataGrid in .NET 1.1) and sum the
columsn there. Go ahead and explicitly add this column to the DataSet in the
designer (and the rest of the columns if you are wise). In the binding event
grab the current binding row and then access the columns in question.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside the box!
*************************************************
"ClevelandSteve" <syahnert@.hotmail.comwrote in message
news:1155759519.915735.90550@.i42g2000cwa.googlegro ups.com...

Quote:

Originally Posted by

Hello all,
>
I have a datagrid that returns sales of items by month from an Oracle
table using a datareader like so:
>
Item |Jan |Feb | ... |Dec
itm1 |10 |5 | ... |6
itm2 |7 |2 | ... |8
>
I want to add a column to the end of the datagrid that would sum the
row:
Item |Jan |Feb | ... |Dec |Total
itm1 |10 |5 | ... |6 |21
itm2 |7 |2 | ... |8 |17
>
I would think that this would be easy to do, but I can only find
articles that explain how sum a column into a footer. Could someone
point me in the right direction? I've only been programming in
asp.net for about four months now, so the help is appreciated.
>


I got it working now. Thank you for the tip.