Dear Sir,
while i have run my project then mention url working.
lgn.aspx :
Login :http://10.1.246.59/NEW_OCMS/lgn.aspx
Index.aspx :
Index : http://10.1.246.59/NEW_OCMS/Index.aspx?EmpId=101768
But while have change EmpId, its displayed another employee details in Index.aspx page whithout login. how to remove this error.
Please help me sir.
public partial class Index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(Request.QueryString["EmpId"]))
{
lblName.Text = Request.QueryString["EmpId"];
}
if (!this.IsPostBack)
{
string sql = " SELECT* FROM COMP_BOX_ALL5 e INNER JOIN emp f ON f.EMP_ID = e.EMP_ID where e.EMP_ID=" + lblName.Text + "order by COMP_LODGE_DATE desc";
GridView1.DataSource = this.GetData(sql);
GridView1.DataSource = this.GetData(sql);
GridView1.DataBind();
}
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
}
}