comparison Demo/Asp.Net/Web/WishList.aspx.cs @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f990fcb411a9
1 using System;
2
3 public partial class WishList : System.Web.UI.Page
4 {
5 protected void Page_PreInit(object sender, EventArgs e)
6 {
7 if (!IsPostBack)
8 {
9 string itemId = Request.QueryString["addItem"];
10
11 if (!string.IsNullOrEmpty(itemId))
12 {
13 Profile.WishList.Add(itemId);
14 Profile.Save();
15
16 // Redirect to prevent duplictations in the wish list if user hits "Refresh"
17 //
18 Response.Redirect("~/WishList.aspx", true);
19 }
20 }
21 }
22 }