Button type “button” vs. “submit”

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.







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.




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>();