ASP.NET

125K

Solutions

28K

Contributors

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi I am new to C# core and I come from a VB forms background.  I have been working on a web application project using the latest asp core.  

All i am trying to do at the moment is have a page where you enter a serial number then on leaving that serial number it comes back and displays some additional information from a stored procedure in a grid on the page or it displays an error from the stored procedure.  Then there is another button that will fire another stored procedure that will insert data into a database or return an error on error checks.   If not an error the whole page resets and ready for the next one.

The problem I have been having is that i cannot work out how to fire the stored procedure and return the data after leaving the text box and display an error if needed.  To simply it I have added a button so I enter the serial number then press the button rather than get the on leave event from the text box.

My problem is the data is binded before the page loads with some default data.  I do not know how to do it part of the way through or how to pass a parameter (serial number to it).  I have the ajax to call a function that displays the data from before, but i do not know how to change the lookup to be based on that serial number.  Or in the case of being an error display an error.

My code is below:
Model class:
public class OperationsData
    {

       public string Job { get; set; }
       public string Item { get; set; }
       public 

Open in new window

0
Exploring SharePoint 2016
LVL 13
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

How do you reset a Microsoft ASP.NET Application?  I have the following files:

*.master
global.asax
*.aspx
web.sitemap
*.aspx.vb
web.config

I want to use the files I have and start all over.  Is this doable?  If so,  how???
0
Need to get value of webpage URL (with query string parameters, without, and only string with parameters)
Thank you in advance.
0
In Visual Studio or asp.net is there a way to track a programmer's productivity -- lines of code created or altered and time spent in the project actively working/ debugging/ etc.?

We use Team Explorer for our code repository, so perhaps there is a way to use that.

I've looked at an example of a coding tracker and it seemed to only handle it locally for the local person to see. I'd like something perhaps handled in Team Explorer by the checked in developer.

I once worked for a company that had a tracker like that, but not visual studio related, and at the end of a quarter they would have a % productive and level of difficulty the person did in their coding.

Is there such a thing available anywhere for .NET programming?


thanks!
0
Hi,
Question: I wanted to host my web application developed in React.js and asp.net core 2.2 WebAPI with unlimited SQL Server 2012 (or higher) databases support. Which shared hosting plan best suites this requirement?
Please help
0
HI Expert,

I have issue  with mobile application, it is hosted on local Server with IIS and Asp.net.
Images are not showing on mobile apps. it works fine if I reset  IIS. But the issue occures again after a period of time. at the Same time the default website is working on all browsers internally and externally.

please  let me know if there is any solution for this issue
0
I have a asp.net project that has a upload files feature. I heard about a Symantec scanning api that I can use to scan the files that is being uploaded . has anyone use this. if so, how does this work and how/where to install this so that my app can call such a service to scan ?
0
I need to query an ASP.NET C # page using Delphi and the ICs overbyte TSslHttpCli component. I can get the login page with "GET" authenticate with "POST" but when making a query on an internal form using "POST" I am logged out with session expired.

I have a simple font doing the operations, who can help I send the fonts already working and showing where the error is.
0
I have asp.net website and I want to record changed field in to log table, for eg. That page has 20 textbox then I want to know which field User changed out of 20, so I can maintain
that in log table, Please let me know
0
Receiving error in ASP.net application: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.

This is a new web page in an application that has ran without problem for years.

It is a very large page that performs lots of work.

I have reviewed the page and made sure that the connections are all being Disposed of after use, but still getting the error.

Any ideas?
0
Angular Fundamentals
LVL 13
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

I'm trying to do a custom 404 error message. I use this in my web.config:

    <customErrors mode="On" defaultRedirect="~/default.aspx">

      <error statusCode="404" redirect="~/CustomError.aspx" />

    </customErrors>

Open in new window


When I type in:

http://mywebsite.com/clientname

I want it to go to this page, where I will check the referring URL, but instead I get this error:

HTTP Error 404.0 - Not Found

What am I missing to get it to trigger my page?
0
My client wants a url like this:

http://mywebsite.com/NameofClient

I use ASP.NET WEBFORMS, so please no MVC answers.

If I do:

http://mywebsite.com/NameofClient

It expects that to be a folder name and errors.

If I do it with the ? it works:
http://mywebsite.com?NameofClient

But the client says ?'s are too confusing.

Any suggestions?

Can this be done with MapHttpRoute in the global.asax and then redirect to the page I want?
1
Hello,
Any suggestions for an open-source Education ERP system under MIT or Apache license?
0
I'm not sure what to call it, but you know how when a page needs to load thousands of records, it loads only some of them and as you scroll down (think Youtube) it has a spinner and loads some more.

We are using DataTables, it has a drop down to select how many rows show per page, it has a pager showing how many pages. Then it loads all of the data to client side.

On our huge clients, that can take a loooong time.

Is there a way using DataTables to load partial data so that it appears to load immediately, then only load the other pages as you select them, etc.

The problem I see is with the little search panel, now that data isn't client side, so it can't do the quick searches. But these huge page loads are killing us time-wise. So we need to do something else quick.

Can someone direct me to an example of DataTables and what we can do with huge amounts of data?

We use ASP.NET.

Thanks!
0
I have an application where I have a file uploader. Code works perfectly on local, dev and UAT. Prod has the same version but for some reason as soon as user tries to upload file on Prod it throws an generic error. There are no logs for me to check whats going on. I also checked security on the folder and that is also same as UAT. running out of ideas. has anyone faced similar issue?  its asp.net application
0
Hello,
I anyone have experience with MixERP? I am trying to install it on my local machine and shared hosting but failed on both, any one have experience can help?
I followed this guide to host on interserver hosting: https://mixerp.org/blog/erp/how-to-host-mixerp-in-interserver
I followed this guide to install on my local: https://mixerp.org/site/erp/erp-installation-guide
Both failed
0
I am getting the following error from my Web application. The application compiles without error but when I try an run it locally using F5 I get this error. I have cleaned the solution, re-generated WebForm1.aspx.designer.cs and re-installed all nuget packages but still getting the same error. ComboBox1 belongs to AjaxControlToolbox. I can understand how I get a successful build and then at run time it fails to compile successfully. Any ideas why ?



Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0103: The name 'ComboBox1' does not exist in the current context

Source Error:


Line 116:
Line 117:            restoreSessionParms();  // restore parameters from previous call
Line 118:            ComboBox1.Focus();
Line 119:
Line 120:            //TEMP CHECKS

Source File: C:\Users\PatClarke-DataManage\source\repos\TiosClient\TiosClient\WebForm1.aspx.cs    Line: 118


Compiler Warning Messages:

Show Detailed Compiler Output:

Show Complete Compilation Source:


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4001.0

Webform1.aspx
<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="WebForm1.aspx.cs" Src="WebForm1.aspx.cs" Inherits="TiosClient.WebForm1" 

Open in new window

0
We are forwarding a bunch of data to different servers using HTTP CLIENT
These 3rd party servers vary in response time
Some respond in MS and some are taking up to 120 secs to respond
This slow response time is directly affecting our server performance and threads etc

One solution is to time out after N secs, but I was wondering if there was anyway to send the packet and not wait for a response
However i'm not sure if this is possible using HTTP CLIENT, or if there is a work around?
0
Hi,

I have a sass mixin looking like this:
@mixin BannerTop($url, $height) {
  position: relative;
  height: $height;
  background-color: #000;

  &::before {
    content: " ";
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.5;
    //background-image: url(../../Images/AdobeStock_27182189_Preview.jpeg);
    background-image: url($url);
    //background-color: rgba(0, 0, 0, 0.8);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    //background-size: 100%;
    height: $height;
  }

  &-TextBlock {
    z-index: 2;
    top: 50%;
    left: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;

    h3 {
      color: white;
      
      font-size: 4rem;
      font-family: $font-display;
      font-weight: 700;
      
      margin-bottom: 2rem;     
    }
  }
}

Open in new window


I then uses it like this:
  .TopBanner {
        @include BannerTop("../../Images/volvo_v90_490922.jpg", 50rem);
      }

Open in new window


My qustion is if it's possible to in someway load the background image dynamically (say from a db request)?

I would like to be able to use the same sass/css but have a different image depending on what id is loaded från the db.

Thanks for help!

Peter
0
Announcing the Winners!
LVL 13
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

Hello,

I would like to display columns from a table for only the ones selected in my business logic, how do I modify my code to achieve this? and also how do I search the table by entering data in a textbox?

1, Home Controller

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using AOP6TEST.Models;
using static DataLibrary.BusinessLogic.AOP6Processor;

namespace AOP6TEST.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult ViewAOP6()
        {
            ViewBag.Message = "AOP-6 Data";

            var data = LoadAOP6();
            List<AOP6Model> AOP6 = new List<AOP6Model>();

            foreach (var row in data)
            {
                AOP6.Add(new AOP6Model
                {
                    SN = row.SN,
                    AGD1 = row.AGD1,
                    COUNTRY = row.COUNTRY,
                });
            }

            return View(AOP6);
        }
    }
}

2, Business Logic
using DataLibrary.DataAccess;
using DataLibrary.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataLibrary.BusinessLogic
{
    public static class AOP6Processor
    {
        public static List<AOP6Model> LoadAOP6()
        {
            string sql = …
0
I have a dropdownlist that I need the clientidmode to be static.

<asp:DropDownList ID="ddlClientTest" name="ddlClientTest" clientidmode="Static" CssClass="" runat="server">
        </asp:DropDownList>

Open in new window


I have defined it explicitly in the code in front as above.

However, when it is rendered it adds another name to the front like so:

<select name="ctl00$ContentBody$TeamSearchGridControl$ScreenNameControl$ClientComboControlFilter$ddlClientTest" id="ddlClientTest" name="ddlClientTest">

Open in new window


I'm trying to add a Trigger for a button on a different control and it complains it can't find the ddl, so I suspect, that it is because of this renaming of the name. I view source code and that's the only thing that looks off.

        Dim newtrigger As New AsyncPostBackTrigger
newtrigger.ControlID = "ddlClientTest"
 UpdatePanelTeamGrid.Triggers.Add(newtrigger)

Open in new window


The error is:
A control with ID 'ddlClientTest' could not be found for the trigger in UpdatePanel 'UpdatePanelTeamGrid'.
0
I have a new project , where I have to upgrade an asp.net application. currently, application saves XML file in column with varchar(max). the application reads the XML file from the database, saves it to the session and data is read from the XML and displayed to the user. any changes from the user to the data is saved to the XML and eventually saved back to the database.

this workflow of saving the file to the session is not secure and also not efficient. I am planning to create tables/columns for all of the data points in the XML.


with this approach, I can just read the data points needed for a web page  being displayed without
having to load the full XML file in the session.

any thoughts/comments/suggestions for this approach or is there a better way to do this?
0
We have a console app which pulls data from rabbitMQ and then pushes via websocket (signalR) to web app

However we have noticed that when there is a small outage, there are many messages in the queue and it takes a while to catch up
What we need to do is process from Last message in queue backwards, then we could check the timestamp and see if its older than what was already sent and discard old data.
I read some old articles online that said LIFO is not supported by rabbitMQ

If not are there other queues/tech to look at?
Alternatively we could get all messages into c# and then flip the order, but as many messages are coming in at same time we'd opt for a more simple solution first if there is one
0
Hello,
I am working on a VS2008 project which uses crystal reports.
All the crystal reports appear with VS2017 icon and when i click on it , it would not open. Instead it gives the message
"Please wait while windows configures Crystal Reports Basic for VS 2008."
What should be done to fix this issue?
crystal report  .rpt file


Thanks in Advance
0
Hi I am using ASP.Net MVC with C# and I have a webpage with some buttons. Is there a way I can simulate clicking one of the buttons from code behind in the controller? Thank you.
0

ASP.NET

125K

Solutions

28K

Contributors

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications