Пример #1
0
    protected void DDL_SiteList_TextChanged(object sender, EventArgs e)
    {
        IList <SiteAdsInfo> list = new SiteAdsService().SelectSiteAdsById(new Guid(DDL_SiteList.SelectedValue));

        RPT_AdsList.DataSource = list;
        RPT_AdsList.DataBind();
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DDL_SiteList.DataSource     = adsSiteDal.SelectAllSite();
            DDL_SiteList.DataValueField = "SiteId";
            DDL_SiteList.DataTextField  = "SiteName";
            DDL_SiteList.DataBind();
            DDL_SiteList.Items.Insert(0, new ListItem("所有", Guid.Empty.ToString()));

            //显示网站名称和地址
            if (!string.IsNullOrEmpty(Request.QueryString["siteid"]))
            {
                try
                {
                    DDL_SiteList.SelectedValue = Request.QueryString["siteid"];
                    IList <SiteAdsInfo> list = new SiteAdsService().SelectSiteAdsById(new Guid(DDL_SiteList.SelectedValue));
                    RPT_AdsList.DataSource = list;
                    RPT_AdsList.DataBind();
                }
                catch (Exception ex) { }
            }

            DDL_AdsList.DataSource     = CacheCollection.GetAllAdsInfo();
            DDL_AdsList.DataValueField = "AdsId";
            DDL_AdsList.DataTextField  = "AdsName";
            DDL_AdsList.DataBind();
        }
    }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!string.IsNullOrEmpty(Request.QueryString["id"]))
         {
             try
             {
                 Guid   gid     = new Guid(Request.QueryString["id"]);
                 string adscode = new SiteAdsService().GetAdsCode(Request.QueryString["id"]);
                 Response.Write(adscode);
                 Response.End();
             }
             catch (Exception ex)
             {
             }
         }
     }
 }