Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.

Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.

Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.

If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.

Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.

Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.

Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.

If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.

No advertising or soliciting.

We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.

We have a form on our intranet site that employees must complete yearly.

To complete this form, employee must first enter his/her employee ID.

This ID is checked to see if this employee has completed this form before.

For instance, if this employee completed this form in the year 2016 but has not completed it in the year 2017, then his/her existing info (name, email, title) are pulled and are populated into their respective textboxes with a message that says, "Proceed"

If the employee has completed the current year of 2017, again, his/her information is pulled from employee table and populated into the textboxes so they don't have to enter those information again.

This time, the employee gets a message, "You have already completed this form"

If however, the employee has never completed this form, then the textboxes containing employee's info (name, email, title) are blank with a message, "Proceed"

So far, the only solution that seems to work is when employee has completed the form for the current year because the employee gets a message, "You have already completed the form".

How should I modify this to work in the other two situations where employee has completed previous year but has not completed the current year and employee has not never completed the form before?

I would imagine that you have a column in the database design that represents the "FORM_YEAR" and "FORM_STATUS"
When the form is completed the status of the "FORM_STATUS" changes to completed or true and the FORM_YEAR would be updated to 2018

Not sure where to place this post.
I took the update a couple of days ago for VS2017 V15.5.0
My VS2017 was working fine for over a year and this update changed something, and I can't pinpoint it.
So I work on the old style MVC projects, where you have a Views, Controllers, etc. and the views went black and white, no intelisense.
Then on the create project, it no longer shows under website, MVC. It only shows Core.
The VS2017 installation always bombs on a DISM file called netfxextension-aspnet45 and says it doesn't exist.
I'm not sure if my VS2017 is broke or if my Win10 is broken.

Just wanted to see if anyone else has ran into this and a point in the right direction to fix it.

I've done that like 5 times yesterday.
I think that the templates I'm looking for can be downloaded, in which I tried yesterday. But it failed to install because netfx4extendable-aspnet45 count not be located.
So today I will focus on finding that feature and install it.
I think the Win10 team and VS team have a conflict here.

I finally fixed it and it works great now.
It was a Windows 10 problem. Guess the last big update broke it.
So I had to create a installation disk and do sort of a clean install.
Now my VS2017 15.5.1 works and all the project templates are there now.
And the Views have intellisense and color now. Go Figure, spent 2 days thinking it was VS2017

I've created my own rest service. For test purpose i've used Soap UI for testing of the service.

Now i try to consume this service in a webform. On the controller i can see that it has processed a call, so the service request gets through to my service. By debugging i can see that the rest server gets the data from the database.

await signs the rest of the method up to run as a continuation when the awaited task completes. By default, it will be scheduled to run in the same execution context as the caller.

Calling .Result on a task blocks the current thread until the task has completed. But the task can't complete until the continuation has run on the current execution context. Which can't happen until the current thread is un-blocked. Which can't happen until the task has completed.

The quick-and-dirty fix is to add .ConfigureAwait(false) to your awaited tasks. That allows the continuation to run on a different thread:

var liste = await client.GetManyAsync().ConfigureAwait(false);

The best solution would be to move your work to a proper task-returning async method, and register that as an async task:

I have a process that populates a pdf template based on user input. Can the system handle multiple users filling out web form and populate pdf template and save the populate pdf into a different directory.

I am using Itextsharp. We are using one pdf template to create the pdfs. Should I put the PDF template in the database and load it into my program as a blob?

Our requirement is that each gridview control must have a checkbox next to it.

Users are asked to fill all the textboxes in each gridview control.

However, if user does not see the need to complete the textboxes in any particular gridview control, then we need to have user check a box next to each gridview control to disable that gridview control.

If any gridview is not completed and a box is not checked, an error needs to be raised and user should not be allowed to submit the form.
Does anyone know to do this?

If you have not done it with Gridview, especially when you have to make sure that user cannot submit without either completing the textboxes for a particular view or checking a box next to a particular gridview, then you can't it is simple.

All the .Net stock controls for WebForms follow the same format. I've done it in code behind using server controls in pure code, but have never done it in code behind using the control on a web form. But it should be the same thing.

I have successfully implemented code which uses ManagementObjectSearcher to query and return the status of printers on one of our servers.

Now what I would like to do is use this code from an ASP.net web page so that my user community can view the status of those same printers. The problem is that the account that the webserver executes as does not have the appropriate permissions to retrieve the data.

My research seems to point to a method to get the data where I would pass credentials while executing the query.