My site is distributed across multiple servers in a Web farm. Users will be able to navigate through the pages of the site and select products for purchase. I am using DataSet object to save their selections. I want to ensure that each user’s shopping cart DataSet object is saved between requests when the user is making purchases on the site. Shall i use Cache or StateBag object or HttpSessionState object . What do you suggest? Welcome to DP.
Since each visitor is assigned a unique session id, session variables are very efficient. Also, the clean up of abandoned carts at the end of a session, if stored in a session variable, can be automated by destroying all session variables in Session_End event in global.asax. protected void Session_End(Object sender, EventArgs e) { Session.RemoveAll(); } Code (markup):
At first I don't suggest the cache object because it may cause problems , you may lose all data that's saved on it if the memory on the server is fading or the application get restart or any reason So .. Session State or ViewState? please read this quotation (dotnetjohn.com/articles.aspx?articleid=71) and you can get the answer Mohammed
yes, i agree. use the Session object. a small note though: if your server uses a web garden, you'll have to configure your ASP.NET website to use the StateServer instead of storing sessions InProc.
hey there m lokin for an image scroller in my asp.net page something which loks like the one on this page.. http://www.componentart.com/charting/gallery.aspx?control=WinChart .. and m also lokin for tutorials on VB.NET in pdf version.. can u help?
This thread strikes me as almost complete Troll Bait. I feel bad for feeding it, since you aren't contributing elsewhere. But, WTH, as long as everyone knows it's Troll Bait Anyway, I could be absolutely wrong. Can't hurt to ask for help, right? Even if you seem to be completely ignoring the actual forum. I'm trying to build an ASP.NET 2.0 website. I'm running up against the following compiler errors: One line [65] produces: "The server tag is not well formed" <td runat="server" id="lblPriceItem<%# DataBinder.Eval(Container.DataItem, "item_id">) %>">Price </td> The next error (from line 62) looks like: Expression expected. Line 62 looks like: <td rowspan="3" runat="server"><%# DataBinder.Eval(Container.DataItem, "description") %></td> The complaint about line 62 comes from column 99. which is the "<" character in the </td> entity. Am I doing something stupid [probably]? Am I missing something obvious? [More likely]. Please, share with us your wisdom. I'd certainly appreciate it. (Or anyone else's). I'm running across an ugly issue. I'm getting a complaint about the line that goes: <td rowspan="3"><%# DataBinder.Eval(Container.DataItem, "description") %></td> Code (markup): The compiler error is "Expression expected" which explains Oh, so much.
I had been waiting for the person who started this thread to make good on his proclamation. Well, jimrthy, you may be correct in assuming OP’s intentions. Let me see if I can explain it: Error on line 65 tells me that you are moving from ASP to ASP.NET platform. The id tag needs to be a valid string. You are trying to assign a value dynamically. There are ways to achieve this. You can write the whole <td> tag using <asp:literal>. Also, since you are using <td> as a server control, assign the id value in code behind. Error on line 62 is a bit complicated to explain. The DataBinder class exposes the static method Eval which eliminates explicit typecasting. To use this functionality, you must provide the naming container for ‘descrption’.
Or maybe not. I see that he's finally gotten around to adding a few other posts to the board. Well, yes and no. This is basically a new homework app I assigned myself to teach myself ASP.NET. It's all fresh code. I'd already reached the conclusion that the hype about minimal coding was ridiculous. It doesn't seem as though MS has really added much, except more controls and a more rigid programming model. It's about what I expected when I first started toying with it. If you want to do anything interesting that MS didn't foresee, you really need to build your infrastructure and custom controls. That gives me something to go on, thanks!