C# - Keeping Basket More Permanent?
Feb 22, 2011
I need to keep my basket more permanent I have two options and I want to choose the best one.
I have eCommerce web site application in asp.net and there is a basket include products which are selected by users before, so options:
1- keep basket in database (consider the cost and time to store and retrieve information)
2- store my basket in Cookies (I don't know what the implementation is)
I couldn't use session because it is not permanent and clear by closing browser.
My goal is : when the user close the IE for 1 day or 2 days make ability to remember all products that already added to basket.
In addition, my basket is store in hash-table now, for example : {1:4055,2:4588,...} they are ID and product code(keys). they are all save in a hash table.
View 1 Replies
Similar Messages:
Sep 15, 2010
I want to implement a shopping basket.
I created a shopping basket class, and included all the functions inside it that basket will need.
It works OK, but on every content page I need the lines:
Basket myBasket = new Basket();
myBasket.drawBasket();
Is there anyway to get that code to execute on every page without having to manually create the class and run it? Perhaps not use classes?
View 3 Replies
May 11, 2010
i have a buy basket in master page.
and when user add a product(for child) i want to Ajax update buy basket
how i can implement that?
View 3 Replies
Dec 26, 2010
I developed an ecommerce application.In this application (out of all other user products stuff ) use Sales to products
Here is simple demo:
http://clients.mantis.co.il/EcommerceDemo/
For example
Buy 20 products and the other 2 product with 50% off
And another example
Buy 1 product and the other cost 9.99$
And last example
Baying more than 600$ got 20$ discount
Course calculate this is not so simple, and the GET BASKET event can take time
I wondered what the best way to do it. My 2 options are:
1. Try to cache the user basket.Yes - because this calculate make just one time (until the user change and add product to the basket etc')No - because this object keep on the server, and if I take a situation that many user fill their basket I don't want the server work slower because the consequence of this decision.
2. Of course the opposite to call this calculate each time than its make slow the make basket event but this not "sit" on the sever and I am not afraid of crash the server.
View 1 Replies
Jan 21, 2011
how to make 301 permanent redirect in asp.net?
I have written code in Global.asax file but my web client says it is not working,
i have written follwing code in Global.asax file:
protected void Application_BeginRequest(object sender, EventArgs e)
{
if (HttpContext.Current.Request.Url.ToString().ToLower().Contains(
"http://lsatfreedom.com"))
{
HttpContext.Current.Response.Status =
"301 Moved Permanently";
HttpContext.Current.Response.AddHeader("Location",
Request.Url.ToString().ToLower().Replace(
"http://lsatfreedom.com",
"http://www.lsatfreedom.com"));
}
}
View 4 Replies
Jul 8, 2010
I am doing a 301 permanent redirect from an old server to a new server. When the new server's page is hit I want to be able to determine whether the user comes from the old site and then react differently, i.e. instruct user to re-book mark the new page.
View 2 Replies
Jan 27, 2010
The company I am doing work for are creating an online catalogue and want links on product details that will automatically add said product to the basket of their ecommerce store, namely [URL]
View 1 Replies
Mar 22, 2010
Our old site is in Classic ASP, and we know there are many people who have pages bookmarked. The new pages will be written in .Net.I thought of url rewriting (overkill?), but I'm not sure how to set that up (if this is the best way, I'll need some links to tutorials for using it in this specific manner. I've seen it used by never done it myself)What is the best, most efficient way setup some permanent redirects for these .asp to aspx pages?
View 1 Replies
Jan 12, 2011
Our old ASP.net site stored static images in a sub directory on the root called /images.
Our new ASP.net MVC site stores these images in the new layout of /Content/Images
I've changed all the pages in the site to cope with the new folder structure, but I'd like to set up Permanent Redirects from the old static images to the new location.
View 1 Replies
Jul 22, 2010
I moved some of my old asp pages to new aspx website. In all of the old pages i used (for file example.asp):
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.domain.com/example.aspx");
The problem is that when the page domain.com/example.asp?param=value¶m2=value2 is requested - the redirect ain't working...
View 1 Replies
Oct 1, 2010
I have 2 sites, one the main product site the other a secure site featuring the basket and checkout processes.
When a user clicks "add item to basket" I am creating a basket in a database and then adding the items to the basket. The theory was then to store the id from the database for the basket (the basketid) in a cookie, redirect the user to secure site, use the basket id from the cookie and display the contents in the basket.
However I am having trouble getting the secure site to use the same cookie. When I redirect the users to the secure site, the basket appears empty. I need to go back to the main site and then back to secure before the cookie appears.
Here is the code for the cookie
[Code]....
And then on the secure site this is how it gets the basket ID from the cookie
[Code]....
But like I say it's having problems. I've tried replacing the cookies with session variables as well but it didn't work.
View 6 Replies
Sep 8, 2010
I am busy building a shopping cart with cookies. I have datalist which I populate from the cookies with a delete button next to each cookie
[Code]....
Now the problem is that when I hit the delete / remove button to expire the cookie, what happens when repopulating the datalist is that it shows the original cookie with all it's values as well as a new entry where all the values are blank.
View 3 Replies
Jun 28, 2010
I upgraded my site from asp to asp.net.This means that all of my previous asp files became obsolete.I don't want to lose my Google Ranking of the old pages.
What is the proper way to redirect?I tried to catch all of the old asp pages is my 404 and then to:
if Request.QueryString("aspxerrorpath").contains("index.asp") = true then
Response.Status = "301 Moved Permanently"
Response.AddHeader("Location", "http://www.domain.com/index.aspx")
Response.Redirect("/index.aspx")
end if
but it doesn't catch asp pages, only aspx.
View 3 Replies
Feb 7, 2010
i am using an div tag for that i am keeping an scroll bar. which is an slider control. now here i need to replace the vertical line image with my own image . and the scroll image to. so it possiable to achive this in the slider control what we are using
View 1 Replies
Apr 23, 2010
I'm utterly new to APS.NET and in particular the MVC model...! I have a Telerik RadGrid control that I'm using. Until now (following NerdDinner) I was having the Model passed back to the view and this provided access to the various properties I wanted.
eg: Inherits="System.Web.Mvc.ViewPage<MySqlMvc.Helpers.PaginatedList<MySqlMvc.Models.Customer>>
.. lets me loop around the Model object and extract Customer data. This RadGrid control, however, needs me to use an EntityDataSource (hooked up via the designer). Does this have implications for maintaing the MVC pattern? I'm a little confused about how the EntityDataSource works in relation to my Model.EDIT: I do know there is an MVC version of the RadGrid but we also need the RadScheduler and a few others.. besides that, I'd still like to know the impact.
View 1 Replies
Feb 16, 2010
I am trying to make a program that queries the same tables every few seconds.Is it better to use the same connection to reconnect everytime before the program requeries ?
View 5 Replies
Apr 6, 2010
This would be a simple one for me if I was binding this dynamically. I don't think it's necessary to have a code behind for only 4 or so values. Anyways here is my ddl.
[Code]....
The problem is that when a user selects a value and it postbacks my ddl resets to the first value. How do I prevent this?
View 8 Replies
Apr 22, 2010
I'm creating a ASP MVC application. And because of the complex authorization i'm trying to build my own login system. (So i'm not using asp membership providers, and related classes).Now i'm able to create new accounts in the database with hashed passwords.But how do i keep track that a user is logged in.Is generating a long random number and putting this with the userID in the database and cookie enough?
View 1 Replies
Nov 18, 2010
I have an access DB created in 2007 and saved in 2003 (.mdb). The tables contain links to a file server on my internal network. I'm trying to import the db into Expression Web 4 and keep the links intact. Currently, I can get the import to work, but the links get stripped out and displayed as plain text.
View 5 Replies
Oct 1, 2010
I am currently working on multiple group sites for the same parent company. All the sites are basically the same, and share the same code base however they have different stylesheets, master pages and config files.
As the number of sites is increasing I am finding it difficult to keep the sites synchronised and propagate bug fixes/changes across them all as each has it's own copy of the code.
Does anyone know of a way I could keep a single master copy of the site and easily propogate changes to each of the other sites.
View 6 Replies
Jan 21, 2010
I was wondering wich's the best way to "keep alive" the InputStream of the FileUpload Control.I would give you one example. Let's assume you have the FileUpload control in one WebForm, and you want process it in the next WebForm (after Response.Redirect).It would be great (unless for the memory) to have something similar to:
Session["PostedFile"] = this.FileUpload.PostedFile.InputStream.
Unfortunately, this results in:
System.ObjectDisposedException
View 2 Replies
Feb 4, 2010
I have a list of treeview nodes. When I click on a node it redirect me to a page but my treeview nodes go back to my orginal settings for the nodes meaning doesn't keep the node you click on expand when directing to another page. Is there away to keep the states of the collepse nodes?
View 3 Replies
Dec 14, 2010
I am trying to Generating a Request ID and keeping track of it from request to request.I just want to get the previous request number and bump it up by 1 and log it so I can keep track of the number of requests come to my page.I was looking into TempDataDictionary but that is not working for me.I am new to ASP.NET MVC soexcuse my ignorance.
View 1 Replies
Jul 1, 2012
I am having problems getting my head around this, so my terminalogy might be off. What I am trying to do is have a dropdown list with different groups, and then two listboxes that run queries based on the selection from the dropdownbox. The left listbox shows all items except those which are in the selected group. The right listbox shows only those in the selected group. I also have two buttons - one to move selected items from the left listbox to the right listbox, and another to move items from the right to the left.
My page has a dropdown list for Groups, populated with 2 records - Group A & Group B. Autopostback is set. When I change my selection on the dropdown list, my two listboxes do change
The problem comes in when I select items in the listbox and click on the transfer button. The records do transfer correctly (that is to say the database query executed correctly and data is moved), but the List boxes are not updated. What I want is to have the form refresh, but there is no AutoPostback for the Button object.
I tried inserting a Response.Redirect back to the same page at the end of the button click event. I thought this would allow me to process the sql command, and then refresh the data. This almost works. It does refresh the listboxes, but it also resets the dropdownbox to the first entry. This in turn changes what is displayed in the listboxes. The data is moved correctly though.
So at this point I have my choice. If the dropdown box behaves and does not change, then the listboxes don't update. If the listboxes do update, the dropdown box resets to the default value.
View 5 Replies
Jan 25, 2010
Example:-
column values:- Microsoft Java
I like to update above record using below SQL, so that new values are appended to old values instead of removing old values.
[Code]....
Output:- Microsoft Java some text
View 1 Replies