Hi, I'm doing a program in c # to help me create the hostpot user in mikrotik but I do not know how to fill a datagrid with the information that is in the router could you help me?
Hi, I'm doing a program in c # to help me create the hostpot user in mikrotik but I do not know how to fill a datagrid with the information that is in the router could you help me?
According to the API, taking the Python program that I have in my notes and adapting it to C #, I would do the following:
MK mikrotik = new MK("x.x.x.197");
if (!mikrotik.Login("admin", "123"))
{
MessageBox.Show("no connect");
mikrotik.Close();
return;
}
MessageBox.Show("connect");
mikrotik.Send("/ip/hotspot/user/add", false);
mikrotik.Send("=name=999", false);
mikrotik.Send("=password=999", false);
mikrotik.Send("=profile=profile1");
//MessageBox.Show("create user");
mikrotik.Close();
But you should provide more information about the error you get.