Button type “button” vs. “submit”

type
The type of the button. Possible values are:

  • submit: The button submits the form data to the server. This is the default if the attribute is not specified, or if the attribute is dynamically changed to an empty or invalid value.
  • reset: The button resets all the controls to their initial values.
  • button: The button has no default behavior. It can have client-side scripts associated with the element’s events, which are triggered when the events occur.

 

https://stackoverflow.com/questions/7117639/input-type-submit-vs-button-tag-are-they-interchangeable

https://stackoverflow.com/questions/37736056/button-type-button-vs-submit

https://stackoverflow.com/questions/290215/difference-between-input-type-button-and-input-type-submit

 

 

debug web service project in same solution as web site project

In your solution file, click properties go to the Startup project node (if it is not already selected)

Next select Multiple startup projects. Select your website and your webservice and in the Action column make sure both of them have “Start” selected.

Now when you debug your website and put a break point in you webservice it should hit the break point.

Thats all i can think of for your problem. Hope it helps.

https://forums.asp.net/t/1428325.aspx?debug%20web%20service%20project%20in%20same%20solution%20as%20web%20site%20project%20

 

 

How to initialize IEnumerable that be empty and allow to Concat to it?

It seams all you want to do is filter your context.Books by some criteria.

IEnumerable<Book> books = context.Books.Where(b => someConditions);

If you still need the empty IEnumerable you can just call Enumerable.Empty():

IEnumerable<Book> books = Enumerable.Empty<Book>();

 

https://stackoverflow.com/questions/17831011/how-to-initialize-ienumerableobject-that-be-empty-and-allow-to-concat-to-it