using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.Sql; using System.Data.SqlClient; public partial class andmesalvestus3 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { SqlConnection yhendus = new SqlConnection( "Data Source=.\\SQLEXPRESS;AttachDbFilename=D:\\kasutaja\\jaagup\\andmedxml1\\App_Data\\Database.mdf;Integrated Security=True;User Instance=true"); SqlCommand kask = new SqlCommand("autoxml2", yhendus); yhendus.Open(); kask.CommandType = CommandType.StoredProcedure; String sisend = Request["andmetekst"]; kask.Parameters.AddWithValue("doc", sisend); kask.ExecuteNonQuery(); Response.Write("Andmed salvestatud"); Response.End(); } }