How remove submit query in output?
In my application I am using datalist and inside it using image button.
code is like:
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
show1();
//Console.Write("hello world");
}
void show1()
{
string total = "SELECT * from [Image]";
SqlConnection connection = new SqlConnection(con);
DataSet ds = new DataSet();
SqlCommand cd = new SqlCommand(total, connection);
connection.Open();
SqlDataAdapter da = new SqlDataAdapter(cd);
da.Fill(ds);
connection.Close();
DataList1.DataSource = ds;
DataList1.DataBind();
connection.Close();
foreach (DataListItem item in DataList1.Items)
{
ImageButton im123 = new ImageButton();
im123.Style.Add("float", "left");
Panel2.Controls.Add(im123);
}
}