Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CommonObject = new common(string.Format("{0}\\url.xml", Request.PhysicalApplicationPath));
            string operate = Request["operate"];
            if (operate.Equals("c") || operate.Equals("u"))
            {
                string newkey = Request["newkey"].ToString().Trim();
                string newvalue = Request["newvalue"].ToString().Trim();

                if (operate.Equals("c"))
                {
                    CommonObject.CreateRssNode(newkey, newvalue);
                }
                else if (operate.Equals("u"))
                {
                    string oldkey = Request["oldkey"].ToString().Trim();
                    string oldvalue = Request["oldvalue"].ToString().Trim();
                    CommonObject.UpdateRssNode(oldkey, oldvalue, newkey, newvalue);
                }
            }
            else if (operate.Equals("d"))
            {
                string key = Request["key"].ToString().Trim();
                string value = Request["value"].ToString().Trim();

                CommonObject.DeleteRssNode(key, value);
            }
            Response.Redirect("edit.aspx");
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CommonObject = new common(string.Format("{0}\\url.xml", Request.PhysicalApplicationPath));
            List<rss_node> list_rss = CommonObject.GetRssList();

            foreach (rss_node rnode in list_rss)
            {
                rssList.Append(
                    string.Format("<li><a href='javascript:void(0);' onclick='submit(\"{0}\");'>{1}</a></li>\n",
                    rnode.value, rnode.key)
                    );
            }
        }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     CommonObject = new common(string.Format("{0}\\url.xml", Request.PhysicalApplicationPath));
     list_rss = CommonObject.GetRssList();
 }