Stucked on embedding my SWF flash file in ASP.NET MVC 3, any Display Template available? - asp.net-mvc

I have a flash swf file that I want to embed in a view in ASP.NET MVC3 project. I found there are many error prone java-script procedure to do that as if I would have done in plain html. But I am wondering there should be some clean helper, HTML extension method or Display Template available for embedding the swf content. I searched a lot in Google but did not find any. Would anyone please help me pointing out any extension/display template for flash swf file embedding ?
Even if you can point me a solution that is commercial, I wont mind to pay. Rather I am looking for a very rich customizable library what can be highly likely to be commercial.

ASP.NET MVC HtmlHelper Extensions for the JW FLV Media Player
http://www.codevoyeur.com/Articles/15/ASP.NET-MVC-HtmlHelper-Extensions-for-the-JW-FLV-Media-Player.aspx

Related

Mobile compatible website template for masterpage

I have been looking all over for templates that are mobile compatible. I understand that people carry the web with them. My present website uses an old css template which does not work well in phones. I found a template here at https://html5up.net/photon
I downloaded this, but I'm having problems integrating it into a masterpage. It is a html page with links to images that are not working. Where can I get a basic masterpage for vb.net that is mobile compatible? It needs to have a nav bar. Thanks.

Asp.Net Mvc: What is the best way to share script/style files in class libraries?

I'm looking for how to share script/style files in class library between Asp.Net Mvc projects.
I know that a lot of posts asking similar questions have been already within the stackoverflow.
But I was not sure that they are what I'm looking for.
I don't have much experience of .Net, and Asp.Net Mvc.
Just I want to achieve things like webjars that redistribute web resources as a class library.
I'm developing a class library that helps to resolve common concern in our products.
It includes razor partial views and razor layouts. They refer some stylesheet files and javascript files. So I would like to put them into the class library.
I thought to put the files into the class library as embedded resources, an tags with a url needs to be located in my web page, and a program for the url have to return the embedded resources as a content file.
What I don't know is such program has already existed, or not.
I think It is a very common issue, hence I guess that .NET has already provided things like that. But I could not find it out in the google.
I got some information regarding ScriptManager. It seems to be a component to use with Web Forms. Although I suppose to be able to port ScriptManager to Asp.Net Mvc, I don't know how to use ScriptManager anyways.
I also got some information to specify a url in script tag converted from web resource path.
It looks very easy and correct way. But I'm not sure that a url to an embedded resource in class library will be resolved.
Please tell me how to achieve it.

mvc webpage without using the default templates

I am using MVC 4.I have designed a webpage in Dreamweaver and then tried to convert it as a razor page. I wanted to view it in a browser, without using Visual Studio. I have heard that a Razor page can be edited using a notepad.
Please help, I am comfortable designing pages in Dreamweaver, than in Visual Studio.
If I understand you correctly you have a HTML design (created in whichever tool you prefer) and you wish to create an MVC website out of this. You have experience in ASP.NET Webforms.
Primarily to creating anything I would follow the topics covered in the ASP.NET MVC tutorials of MVC itself. It's not about "default templates" it's about understanding what builds your final output. Layouts, partial renderings etc...
See http://www.asp.net/mvc
PS: Ask yourself: Is MVC the right choice for my solution? (because I get the feeling everyone just wants to use MVC and doesn't think about what it is and why you should or shouldn't use it...)
If you dont't want to use default template then you can include your css files you created in Content folder. In shared folder which is located inside Views folder you can create the your customized layout which uses the css that you included in Content folder. And you can then include these layout in the views you later create inside shared folder of Views.
You can explore yourself by installing twitter.bootstrap.mvc4.sample from package manager console and see how your project changes.
This package changes your default layout to different layout, which is pretty cool.
Hope you can get idea of what is done and how you include your own layout from this above mentioned package.

how to Play wmv and flv files in asp.net mvc

i want to play video files like wmv and flv in my asp.net mvc application? what is the best solution or plugin to do so
This has little to do with ASP.NET MVC and more to do with HTML. You'll find numerous resources online of how to do this in HTML:
http://www.walkernews.net/2008/08/17/windows-media-player-how-to-embed-wmv-file-in-html-code/
http://www.walkernews.net/2008/01/11/how-to-embed-flv-flash-in-wordpress-or-html/
That was just from a quick bing search for "embed wmv html" and "embed flv html" respectively. There's nothing in MVC that is specifically designed for handling WMV/FLV. If you need to use data from your controller to build the embed HTML code, you can output it from your Model like you normally would for links or anything else (i.e. <%=Model.VideoUrl %>)
I agree with Paul.
I'd like to add that once you are set on the html/script you will be using, you can put it in a custom extension method so in the view it ends something short like:
<%: Html.FlashVideo(someFilePath, related values) %>

CKEditor Image Upload

I am looking to include CKEditor in a project I am working on and I need the image upload support provided by the CKFinder plugin, however I do not particularly need the rest of the CKFinder tool and thus purchasing a license is a little overkill. Has anyone taken the time to implement a custom image uploader for CKEditor 3 that will work with ASP.NET MVC? If need be I can create my own, just wanted to check here first.
Alternatively, does anyone know of a decent WYSIWYG editor on par with CKEditor / Cute Editor that supports image uploading and will work in ASP.NET MVC?
Here is a image uploader I originally wrote in ASP.NET WebForms for Fckeditor (hence the theme no longer matches), that I've modified to work with Ckeditor.
https://github.com/mcm-ham/ckeditor-image-uploader
Update: I've now added an example showing how you can add this WebForms image uploader to a MVC project.
Update 2: I've now added a Razor Pages version which can be used in .NET Core MVC projects.
Here is a tutorial on how to upload image with ASP:NET MVC2 (not Webforms) using CKEditor
http://arturito.net/2010/11/03/file-and-image-upload-with-asp-net-mvc2-with-ckeditor-wysiwyg-rich-text-editor/
I have used ckeditor and the upload control using ASP.NET, but not MVC specifically. I haven't found anything on par with ckeditor that is even close to being as easy to set up or offers the same features.
Not sure of the restrictions for MVC, but I set up file upload support by using the following:
The basic documentation referring mostly to the CKFinder plugin you mentioned:
http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_%28Uploader%29
Better documentation on how to implement the upload component:
How can you integrate a custom file browser/uploader with CKEditor?
Otherwise, I believe ckeditor just stuffs all the image bytes in the request object and sends it to the page configured for uploading. This page can take those bytes and do whatever it pleases (i.e. save them to the file system, sql server, etc.) This is where the custom implementation comes in.
Instead of using a page to do the upload, I used an httphandler implementation. The page ckeditor redirects to calls the requisite javascript function to indicate the status of the upload after it is complete, but the handler really controls the actual file upload. The basic implementation for the httphandler I used is at:
http://darrenjohnstone.net/2008/07/15/aspnet-file-upload-module-version-2-beta-1/
Hope this at least gives you a starting point.
UPDATE: found this while searching for some other stuff. Didn't look at in depth, but seems to be right up your alley:
http://interactiveasp.net/blogs/spgilmore/archive/2009/06/03/how-to-support-file-uploads-in-asp-net-mvc.aspx
If you need to implement it quickly and have a reliable solution, you may consider a hosted solution to upload and store images for CKEditor - for example, our plugin:
http://ckeditor.com/addon/uploadcare

Resources