TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Goran Bibic
455
2.9k
198k
Define variable from count sql command
Apr 5 2018 2:38 PM
Need to define variable count i=count
Becose I need to auto create number of buttons from counter
SqlCommand cmd =
new
SqlCommand();
cmd.CommandText =
"SELECT COUNT(*) FROM roba_usluge"
;
Int32 count = (Int32)cmd.ExecuteScalar();
int
top = 50;
int
left = 50;
for
(
int
i = 0; i = count.ToString(); i++)
{
Button button =
new
Button();
button.Left = left;
button.Top = top;
button.Text = (i + 1).ToString();
this
.Controls.Add(button);
top += button.Height + 2;
}
Reply
Answers (
9
)
How to use line break as a separator in string-join().
Insert picture in datagrid c#