using System;
using System.Data;
using System.Data.Linq;
using System.Linq;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page {

    private NorthwindDataContext db = new NorthwindDataContext();
    private Table<@new> novinky = null;

    protected void Page_Init(object sender, EventArgs e) {
        //adding CSS style file
        HtmlLink newCSS = new HtmlLink();
        newCSS.Href = "~/css/novinky_style.css";
        newCSS.Attributes.Add("type", "text/css");
        newCSS.Attributes.Add("rel", "Stylesheet");
        Page.Header.Controls.Add(newCSS);
        //adding tables
        this.novinky = db.GetTable<@new>();
    }

    protected void Page_Load(object sender, EventArgs e) {
        var news_out =
            from n in this.novinky
            select new { title = n.title, text = n.text };
        news_list.DataSource = news_out;
        news_list.DataBind();
    }
}
