skip to Main Content

Displaying image from database using repeater without HttpHandler in ASP.NET – Html

Is it possible to display the image? The CategoryName was able to display fine, but the CategoryImage displayed as array of byte <asp:Repeater ID="Repeater1" runat="server"> <ItemTemplate> <%#Eval("CategoryImage")%> <%#Eval("CategoryName")%> </ItemTemplate> </asp:Repeater> SqlDataReader dtrImage = cmdSelect.ExecuteReader(); Repeater1.DataSource = dtrImage; Repeater1.DataBind(); Output: Animal…

VIEW QUESTION

Why does Results.Json special-case null (and can I get it to stop doing that)?

Consider the following minimal repro example using the default ASP.NET Core template: var builder = WebApplication.CreateBuilder(args); var app = builder.Build(); // Content-Type application/json, Body: true app.MapGet("/True", () => Results.Json(true)); // Content-Type application/json, Body: "string" app.MapGet("/String", () => Results.Json("string")); // Content-Type…

VIEW QUESTION

C# Create URI from string without decoding %2F as a forward slash – Asp.net

Given the following string URI var str = "https://www.google.com/maps/search/C%2F-%20GBI%20Logistics%2C%2078%20Mallard%20Way%20(Door%20%232)%2C%20CANNINGTON%2C%20WA%2C%206107"; How can I create a URI from this string which doesn't decode the %2F as a forward slash / ?? when evaluating new Uri(str).ToString(); the result is https://www.google.com/maps/search/C/- GBI Logistics, 78…

VIEW QUESTION

ASP.NET (.NET Framework) asp Button in <form> tag doesn't call the OnClick function – Html

I have two forms in my Default.aspx <div class="form"> <form id="WordFilterForm" > <label for="inputString">Enter a string:</label> <input type="text" id="inputString" name="inputString" required="required" /> <br /> <asp:Button ID="WordFilterButton" runat="server" Text="Filter" OnClick="WordFilterButton_Click" /> </form> </div> <div class="WordCountContainer"> <form id="WordCountForm"> <label for="inputText">Enter a large…

VIEW QUESTION
Back To Top
Search