Ano kayang tamang query dito sa pag search ng data sa web api using windows form?
ito yung code ko , pero not found ang result.
ito yung code ko , pero not found ang result.
C#:
var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AppSetting.Default.TOKEN);
var response = await client.GetAsync($"http://xlayer-001-site1.dtempurl.com/api/Students/StudentList" +txtsearch.Text);
if (response.IsSuccessStatusCode)
{
string contentresponse = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
dataGridView1.DataSource = JsonConvert.DeserializeObject<List<Students>>(contentresponse);
}
else
{
MessageBox.Show(response.StatusCode.ToString());
}
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.
Last edited: