skip to Main Content

I try API request post with body type raw to get a token but need understand what is wrong – Asp.net

My method to get tokenKey is : HttpWebRequest httpRequest = (HttpWebRequest)WebRequest.Create(url); httpRequest.Method = "POST"; httpRequest.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 OPR/52.0.2871.99"; string tokenResponse = null; HttpClient client = new HttpClient(); HttpResponseMessage response…

VIEW QUESTION

Getting System.Web.Mvc.SelectListItem as options of DropDownList – Asp.net

I have a ViewBag.CategoryList which contains ViewBag.CategoryList = new SelectList(Category.GetCategories()); My View: @Html.LabelFor(model => model.Category, htmlAttributes: new { @class = "control-label col-md-2" }) @Html.DropDownListFor(model => model.Category, new SelectList(ViewBag.CategoryList), "Select Category", htmlAttributes: new {@class = "form-control"}) What I'm getting is <option>System.Web.Mvc.SelectListItem</option>…

VIEW QUESTION
Back To Top
Search