Gabe
Gabe

Reputation: 6097

Is it possible to use HTML5 in a ASP.NET MVC project in Visual Studio 2010?

For now, I just want to use the <audio> and <video> tags and maybe try out the drag and drop features since these are supported by Firefox 3.6. The project will just be a test project, not necessarily for production.

Upvotes: 4

Views: 2192

Answers (5)

ja928
ja928

Reputation: 438

I wanted a bit more control over the inputs and the ability to use postback on the controls, so I built a suite of HTML 5 Controls. It's got canvas and just about all of the new input types. As was said earlier, one big limitation is the browser your user brings to the site. The inputs will fail gracefully to Input Type="text".

Upvotes: 1

Hannoun Yassir
Hannoun Yassir

Reputation: 21222

Yes just change the doctype. but the question is does your users have a browser that supports HTML5 ?

Upvotes: 0

John Farrell
John Farrell

Reputation: 24754

Absolutely. You can output whatever HTML you'd like.

The HtmlHelpers may not output your desired HTML but its not that hard to change them.

Upvotes: 0

tvanfosson
tvanfosson

Reputation: 532695

Change the DOCTYPE on your master page to

<!DOCTYPE html>

and ignore any validation errors you get. I think you'll be ok.

Upvotes: 0

Francisco Aquino
Francisco Aquino

Reputation: 9127

The big idea behind ASP.NET MVC is that you have total control over the generated HTML, so you just need to use the tags as you wish, no additional work required.

Upvotes: 7

Related Questions