skip to Main Content

How to get ObjectId instead of Timestamp and other information in a List field when querying MongoDB with ASP.NET Core Web API?

My mongodb user collection is of following schema: { _id: ObjectId("6420eb68cd0df40a33b0ead7"), FirstName: 'Ashutosh', LastName: 'Garg', Email: '[email protected]', Password: 'password', Role: 'Tenant', Properties: [ ObjectId("6420eeb8cd0df40a33b0eadb") ] } My User.cs is: using MongoDB.Bson; using MongoDB.Bson.Serialization.Attributes; using MongoDB.Driver; using System.Text.Json.Serialization; namespace webapi.Models {…

VIEW QUESTION

jquery.ui dialog button with a icon

I am looking to have a button from a jquery.ui with a icon. My preferance is fontawsone, but I suppose bootstrap ones are ok. So, say this markup: <asp:Button ID="cmdTest" runat="server" Text="Test Dialog" CssClass="btn" OnClientClick="testdialog();return false;" /> <div id="fundialog" style="display:none">…

VIEW QUESTION

invalid Url generated for POST action – Asp.net

I think there is a problem with URL generation. Assuming that we have the following controller: [Route("[action]")] public class Home : Controller { [Route("/")] public IActionResult Index() { return View(); } [HttpGet] [Route("{number}")] public IActionResult Edit(int number) { return View();…

VIEW QUESTION

Adding javascript var value into string

I have dynamically added textbox in asp.net web form page using javascript as following <script type="text/javascript"> var i = "Placehoder"; $("#partAdder").click(function () { newPart = '<div class="row" id="row">' + '<div class="col-xl-2">' + '<div class="form-group">' + '<input type="text" runat="server" class="form-control form-control-sm"…

VIEW QUESTION
Back To Top
Search