How do I create dynamic keyboard button bot telegram in C#?
For example, read value from database and set value to button also count of button equal database row.
How do I create dynamic keyboard button bot telegram in C#?
For example, read value from database and set value to button also count of button equal database row.
you can read data base cell and insert as text [\""+SqlDataReaderTest["YouDataCell"].ToString()+"\"]
string keyboard= "&reply_markup={\"keyboard\":[";
string temp="";
while (SqlDataReaderTest.Read())
{
temp+=(temp.length==0?"[\"":"],[\"")+SqlDataReaderTest["YouDataCell"].ToString()+"\"]";
}
keyboard+=temp+"}";
remember your (message + keyboard) Length Must be no more than 4000 characters