Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Post
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Reply
How remove submit query in output?
Jayesh shukla
8 years ago
430
Reply
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);
}
}
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to Create a Master-Detail like Customer & Order Details
Editable Web Grid in MVC Razor View using Data Table