1. Project –> Web form Template
  2. Defaul.aspx sisu kustutamine
  3. Site Master sisaldav navigeerimismenüü –> vahetamise!
  4. Andmebaasiga sidumine — View -> Server Explorer ->
  5. Connect to database

Kuidas näidata veebilehel tabelit?

Kuidas lisada tabel täitmine veebilehele?

View –> Toolbox –> DetailsView

Sama allikas nagu tabelil

Configure Data source — Next — Advanced — Generate Insert,delete, update statements —Next — Finish

Foreign Key

Создаем формы ввода на двух связанных таблицах

  1. Data -> DetailsView -> onto the page
  2. Choose Data Source -> New Data Soucre – SQL(new name)

3. Enabled Inserting

Edit Fields, choose the field that will become the dropdown list –> Convert to template fields

Edit Template -> InsertItem Template

ToolBox, Standart -> DropdownList (drag it into the InsertItem Template)

  • Choose Data Source -> New Data Soucre – SQL(new name)
  • Edit Databindings

    Properties -> Behavior – Default Mode – Insert