protected void ImageButton16_Click(object sender, ImageClickEventArgs e)
{
if (Session["login"].ToString() == "true")
{
int i = 0;
foreach (DataListItem Item in DataList1.Items)
{
Label id = (Label)DataList1.Controls[i].FindControl("ID");
Label bidcount = (Label)DataList1.Controls[i].FindControl("Label7");
string email = Session["username"].ToString();
TextBox bid = (TextBox)DataList1.Controls[i].FindControl("TextBox1");
if (bid.Text != "")
{
if (int.Parse(bid.Text) < int.Parse(bidcount.Text))
{
String script = "<SCRIPT LANGUAGE='JavaScript'> ";
script += "AddConfirmbid()";
script += "</SCRIPT>";
Page.RegisterClientScriptBlock("ClientScript", script);
}
else
{
String script = "<SCRIPT LANGUAGE='JavaScript'> ";
script += "invalidbid()";
script += "</SCRIPT>";
Page.RegisterClientScriptBlock("ClientScript", script);
}
}
else
{
String script = "<SCRIPT LANGUAGE='JavaScript'> ";
script += "enterbid()";
script += "</SCRIPT>";
Page.RegisterClientScriptBlock("ClientScript", script);
}
i++;
}
}
else
{
String script = "<SCRIPT LANGUAGE='JavaScript'> ";
script += "login()";
script += "</SCRIPT>";
Page.RegisterClientScriptBlock("ClientScript", script);
}
}