Web Application in ASP.NET c# (Part 4) | Tutorials in 6 parts

preview_player
Показать описание
How to Develop a Web Application in ASP.NET c# | BASIC ASP.NET c# Tutorials in 6 parts
Create a Web Application in ASP.NET c# | Tutorials in 6 parts

ALSO OTHER VIDEOS

===============
Script to copy:
===============

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;

namespace Part1
{
public partial class Delform : System.Web.UI.Page
{

SqlConnection Con = new SqlConnection(ConfigurationManager.ConnectionStrings["MyconnectionString"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
Con.Open();

}

protected void Buttondel_Click(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand("Delete from Contact where idnumber = " + TextBoxID.Text, Con);
cmd.ExecuteNonQuery();
Con.Close();
GridView1.DataBind();
TextBoxID.Text = "";
}
}
}
Рекомендации по теме