Search results for query: *

  1. C

    startup object visual studio c# not showing up

    Can you elaborate more on the problem? We cannot help you if you just type one sentence.
  2. C

    NullReferenceException when runningView

    I have found the solution. It all began in the View(). // GET: Bus public ActionResult Index() { return View(); } As many people were getting the same error as I am, the reason is because there was no argument in the View(), that's why the View did not...
  3. C

    NullReferenceException when runningView

    @foreach (var item in Model) { <<<---- THIS LINE. THIS LINE SPAT OUT THE EXCEPTION AT ME. <tr> <td> @Html.DisplayFor(modelItem => item.staffName) </td> <td> @Html.DisplayFor(modelItem => item.staffOccupation) </td> <td>...
  4. C

    NullReferenceException when runningView

    I passed it from Staff.cs to Index.cshtml. System.Web.Mvc.dll!System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(System.Web.Mvc.ControllerContext controllerContext, System.Collections.Generic.IList<System.Web.Mvc.IResultFilter> filters, System.Web.Mvc.ActionResult...
  5. C

    NullReferenceException when runningView

    I have followed this site on creating a MVC ASP.NET: Create a View in ASP.NET MVC. I am new to this, so I'm familiarising myself with ASP.NET. The first few tutorials were smooth, until I created the view page. using System; using System.Collections.Generic; using System.Linq; using...
  6. C

    The Parameter is incorrect.

    The WIndows .NET Framework form version of the BLE Watcher is running fine, so I am making a ASP.NET version of the BLE Watcher, but I kept getting this error: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)). Note that the code in Form_Load is straight from the...
  7. C

    Error 404 when pressing button

    I fixed it. I realized wrote the method in the buttonController file, rather than the homeController file where I should have written it. My index page is my default starting page, so when I clicked the button, the error yelled at me that it cannot find the method, because I did not write it in...
  8. C

    Error 404 when pressing button

    This is my first ASP.NET Core project. I started with adding a button that will check if it is clicked. It will print a YES when it's clicked. but when I hit the button, I got into this Error 404 page. What did I do wrongly? @{ ViewData["Title"] = "Index"; } <form class="text-center">...
  9. C

    Why is my image not showing up?

    Relatively new to ASP.NET here. I have created an ASP.NET Net Core project (empty form). IN the home page, there is an site image on top of the page title. However, I did not see the image when I test-ran the site. Just the torn image icon. The code below is my home page. ``` <div...
  10. C

    What is the oldest platform of Windows that my app can run?

    My project is a .NET 4.8, because it has Bluetooth LE functions. I have just completed it, and I will be presenting it to a factory soon. I am now tasked with writing a user manual. I am working on System Requirements. Because I wrote the program in Windows 10, I am not sure about the oldest...
  11. C

    Resolved Why am I getting NullReferenceException trying to display Assembly Version?

    It's a .NET framework project. And I get the NullReferenceException when I try to print the project version. public Form1() { label3.Text = Assembly.GetExecutingAssembly().GetName().Version.ToString(); <-- offending line InitializeComponent(); }...
  12. C

    How to read data from a Bluetooth LE Device?

    I am totally new to Bluetooth LE programming. My task is to write a app to read in data from a skincare device called a clartici. It has a sensor that will read the skin and send the data to a computer. I was able to detect and pair the device to the program. I got stuck in the part where I...
  13. C

    Resolved How to fix this? "The type or namespace name 'Windows' could not be found"

    As I was going rounds on Google, I came across this site about C# Bluetooth communication in Japanese. The site said that we need the Microsoft.Windows.SDK.Contracts nuget package. I installed it and the error was fixed ?
  14. C

    Resolved How to fix this? "The type or namespace name 'Windows' could not be found"

    The program will scan and exchange data with a bluetooth device. But right at the start, I get this "The type or namespace name 'Windows' could not be found" from the following two line in the code below. using System; using System.Collections.Generic; using System.Linq; using System.Text...
  15. C

    Question Errors when sending SMTP attachments from a DataGridView

    I have created an SMTP program that sends messages with optional multiple attachments. The attachments are listed in a DataGridView. Here is the code below: private void button1_Click(object sender, EventArgs e) { try { MailMessage message =...
  16. C

    Resolved Program not catching exception

    }catch(Exception eee) { ErrorForm error = new ErrorForm(); error.label3.Text = eee.Message; error.ShowDialog(); } } <--- Right here. It's NullReferenceException
  17. C

    Resolved Program not catching exception

    There WERE exceptions in the first place that were uncaught. I found the cause: at the beginning, the program simply read all sorts of excel files, regardless of whether the values are valid, or if there are blank cells. I did not implement an Excel validation check. So when I tried to copy...
  18. C

    Resolved Program not catching exception

    I managed to fix it. I would catch errors when blank cells, or cells with invalid formats are found.
  19. C

    Google sign-in blocked my email sending feature!

    I created an email sending form for my company project. Here is my code below: private void button1_Click(object sender, EventArgs e) { try { MailMessage message = new MailMessage(); SmtpClient smtp = new SmtpClient()...
  20. C

    Resolved Error: commit -allow-empty-message --file=-

    I've resolved it. Pain in the rear, but I had to unbind my DevOps library with my project by deleting the gitignore, gitattributes files and git folder from the project folder. After that, I relink my project to my repo, and all went well.
Back
Top Bottom