In my application, When I click the submit button on the MainForm, the Please Wait form appears, which shows untill the processing is complete. The submit button redirects to Books.cs. When someone accidentally clicks the Close(X) sign on the main form(MainForm.cs), the execution is not...
The modified code is the quesiton. I edited the question and replaced the original code with the modified code. I wrapped the await Task.Run(() => ProcessBookstoreExcel(cts.Token)); in try/catch block. And to stop the execution of the code after the catch block is hit in the BtnClick(), I added...
I have modified the code. I figured out how to catch exceptions from a different thread. But now my new issue is that after the exception is caught in the catch block. of BtnClick() Then it does not stop execution. It displays the exception and then continues with the other lines after the catch...
I am writing a winform application that reads a large excel file, does some processing, and writes output in some other excel file. While the main form is doing its task, my app shows a please wait form. My issue is that when an exception is occurring in the processExcel Method, the catch block...
I am writing a winform application that reads a large excel file, does some processing, and writes output in some other excel file. While the main form is doing its task, my app shows a please wait form. I want to implement a functionality when if the user clicks on the cross sign of the...
I am working on a winform Application that processes a very large excel file. During the execution it was freezing the UI. So, I found out about async and await in C# that can keep the UI responsive when performing long task. I have implemented them the following way -
private async void...
I using the following form to fill values from a C# Desktop application . I able to fill first Name, Last Name, and email address but I am getting an element not found exception for the drop down and the text area.
https://formsmarts.com/html-form-example
My Code :
private void...
I am trying to fill a website form using C#Desktop application.
I am using the following form as an example -
https://formsmarts.com/html-form-example
private void button1_Click(object sender, EventArgs e)
{
// Initialize Chrome WebDriver
IWebDriver...
...employees. I am storing the data of input .csv files in hashtables. Storing the data in the following format-
<key,Value>
<employee ID, Name*City*AccessCode*Role>
I am then comparing both hashtables and determining what employees are new and what are to be removed. I am storing the final...
I know we have an authorization attribute.
[HttpGet("{id}")]
[Authorize]
public IActionResult Get(int id)
In the startup.cs
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(JwtBearerDefaults.AuthenticationScheme, options =>...
Just a thought, even though if im not able to change the framework and other configuration settings, i guess the deployment team can change that according to the requirements, is that correct? I can just give them the code and they can make configuration settings as per their wish.
I am trying to learn API development. I am using .net 3.1(my org uses VS 2019 and it is only showing me this framework). I have chosen API template(that has a sample Weatherforecast API). Upon executing it,I can see plain JSON in chrome but I wanted swagger UI).
I am getting the following error...
In my organisation. we use VS 2019 version 16.11.21. When I clicked on API template or even ASP.net MVC Core web app, it only shows 3.1(out of support). I know now .net 5.0 is also out of support but in CS 2019, .net 6.0 is not working. When I tried changing the target framework to 5.0 from...
Hello,
I have to develop an application where i have to access service now tickets. The application should access certain types of tickets and ignore the rest. Is it possible in c# to connect to service now tickets?
Secondly, how to connect to the database that resides on AWS or any other...
Hello,
I am using the following test API -
https://97mm2.sse.codesandbox.io/teachers/200
{
"message":"Required Teacher",
"data":{
"id":200,
"firstName":"Jerold",
"lastName":"Britto",
"age":28,
"email":"britto@xyz.com",
"class":10,
"students":[...
Hello,
When I click on Login, it shows the following message -
Same thing happens when I click Register and Contact us. I was finally able to login by stumbling upon the following page when I tried to visit the admin profile.
The validation code is in the button click event. This is the first thing that I am checking.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{...
So, how should I exit an application with a specific error code?
For example, I have to a console application that I run using task scheduler, and I want the app to return a specific error code to task scheduler, I normally write Environment.Exit(1) or
If(this condition is true)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.