Issue After reading Formatting the DataList and Repeater Based Upon Data (C#) on Microsoft Website I found the following code sample. protected void ItemDataBoundFormattingExample_ItemDataBound(object sender, DataListItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { // Programmatically reference
Continue readingCategory: asp.net
[SOLVED] Making pages that can be displayed only if logged in – ASP.NET Core MVC
Issue I have always been programming with ASP.NET Web Forms. Everything was simpler but now for having better performance and modern software, I decided to switch to ASP.NET MVC. I managed to understand most of the concepts but due to
Continue reading[SOLVED] How to get any User Computer's Win32_PhysicalMedia data via a Web Site?
Issue When I use ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMedia") in a webpage, it provides server informations. But I need computers information of any user that is using the website. I prepared an website including Win32_PhysicalMedia query. However it returns only the
Continue reading[SOLVED] Open a new tab in an existing browser session using Selenium
Issue My current code below in C# opens a window then navigates to the specified URL after a button click. protected void onboardButton_Click(object sender, EventArgs e) { IWebDriver driver = new ChromeDriver(); driver.FindElement(By.CssSelector(“body”)).SendKeys(Keys.Control + “t”); driver.Navigate().GoToUrl(“http://www.google.com”) } But the site
Continue reading[SOLVED] ASP.NET Core WebApplication IIS Express Error
Issue IIS Express server is not starting and throwing the following error. The following error occurred when trying to configure IIS Express for project <project_name>. Filename : redirection.config Error: cannot read configuration file I have reinstalled IIS Express server, removed
Continue reading[SOLVED] Create Class for List of Products
Issue I have this GridView that I’m trying to bind data to and I need to create a new class with all my properties and display them in the Grid. Is this supposed to be a list collection because I
Continue reading[SOLVED] Using SQL Server Compact 4.0 with Windows Mobile 6.0 and ASP.NET 3.5
Issue I have created an ASP.NET 3.5 Website and added mobile forms to it through third party templates (since the VS designer doesn’t support the old templates any more). Now I want to use some database handling in my application
Continue reading[SOLVED] How to work with modal window in ASP NET 6?
Issue I have a HTML code: <div class="container"> <div class="row"> @foreach(var post in Model) { <div class="col-sm-8"> <div class="row"> <div class="post-body container shadow p-3 mb-3 rounded-3"> <h2>@post.Title</h2> <p>@post.Description</p> <button type="button" class="show-post-btn btn btn-secondary" data-bs-toggle="modal" data-bs-target="#wholePost" onclick="return showContent()">Show post…</button> </div> <div
Continue reading[SOLVED] @Html.HiddenFor does not work on Lists in ASP.NET MVC
Issue I’m using a model that contains a List as a property. I’m populating this list with items i grab from SQL Server. I want the List to be hidden in the view and passed to the POST action. Later
Continue reading[SOLVED] html.beginform missing from one property in mvc4 razor view
Issue I have this razor view: @using System.Globalization @using Order.Models @model CartIndexViewModel @{ ViewBag.Title = "Shopping Cart"; } @using (Html.BeginForm()) { <div class="table-responsive"> <table class="table"> <thead> <th>Qty</th> <th>Item</th> <th class="text-right">Price</th> <th class="text-right">Subtotal</th> </thead> <tbody> @foreach (var m in Model.Cart.Items) {
Continue reading