The Story of Village Palampur Class 9 Free Study Material PDF
program filesadmin.aspx.csusing System; using System.Colle.pdf
1. //program files
//admin.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace RegistrationUsers
{
public partial class Admin : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("WebForm1.aspx");
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("view users.aspx");
}
}
}
//view users.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace RegistrationUsers
{
public partial class view_users : System.Web.UI.Page
2. {
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
//webform1.aspx.cs
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 RegistrationUsers
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
/* if (IsPostBack)
{
String cs = ConfigurationManager.ConnectionStrings["Data Source =
ADMINIB - 83V87D2; Initial Catalog = employee; Integrated Security = True; Connect
Timeout = 15; Encrypt = False; TrustServerCertificate = True; ApplicationIntent = ReadWrite;
MultiSubnetFailover = False"].ConnectionString;
SqlConnection connection = new SqlConnection(cs);
connection.Open();
string checkuser = "select count(*) from Users where Username=" +
TextBox1.Text + "'";
SqlCommand com = new SqlCommand(checkuser, connection);
7. //program files
//admin.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace RegistrationUsers
{
public partial class Admin : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("WebForm1.aspx");
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("view users.aspx");
}
}
}
//view users.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace RegistrationUsers
{
public partial class view_users : System.Web.UI.Page
{
8. protected void Page_Load(object sender, EventArgs e)
{
}
}
}
//webform1.aspx.cs
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 RegistrationUsers
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
/* if (IsPostBack)
{
String cs = ConfigurationManager.ConnectionStrings["Data Source =
ADMINIB - 83V87D2; Initial Catalog = employee; Integrated Security = True; Connect
Timeout = 15; Encrypt = False; TrustServerCertificate = True; ApplicationIntent = ReadWrite;
MultiSubnetFailover = False"].ConnectionString;
SqlConnection connection = new SqlConnection(cs);
connection.Open();
string checkuser = "select count(*) from Users where Username=" +
TextBox1.Text + "'";
SqlCommand com = new SqlCommand(checkuser, connection);
int temp = Convert.ToInt32(com.ExecuteScalar().ToString());