using System; using System.Data; using System.Data.Sql; using System.Data.SqlClient; using System.Configuration; using System.Collections; public partial class admin_varundus : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { SqlConnection yhendus = new SqlConnection( ConfigurationManager.ConnectionStrings["yhendus1"]. ConnectionString ); SqlCommand kask = new SqlCommand( "SELECT pealkiri, teatesisu, tyybiID "+ "FROM ajaveebitabel "+ "FOR XML RAW('rida'), ROOT('ajaveeb') ", yhendus); yhendus.Open(); Response.ContentType = "text/xml"; Response.Write(""); Response.Write(kask.ExecuteScalar().ToString()); } }