Display HTML page using Websharper without Visual Studio - html

I'm doing a simple demo that involves creating an HTML page using F# and Websharper. Using the samples from the Websharper website I'm able to run a simple Hello World page using sitelets when I hit Debug on Visual Studio. I'm wondering if there's a way to package this in such a way that I don't have to open the file in Visual Studio and hit debug to display the content? I've tried using msbuild from the command line to build the solution but I've had no luck opening the browser that way. What I need is a way to compile the code and display the HTML page without having to open up VS. Also I'm using Web Applications (Sitelets) template for VS for Web Express 2012. Thanks

The "Web Applications (Sitelets)" template does not actually generate HTML files, it generates a DLL that can be run by an ASP.NET runtime. Therefore, depending on your situation:
If you simply want to generate HTML files, without any server-side computation, then you should use the HTML Application template instead. It compiles the sitelet into a set of .html files.
If you need a server runtime, your safest bet is to install ASP.NET for IIS. You can find it in "Turn Windows features on or off", somewhere in the control panel. Then, in IIS Manager, add a Website and point it to the Web folder of your application.

Related

Peek definition in HTML Tools for Visual Studio Community 2017

I was checking the extension HTML Tools for Visual Studio and I found very useful the Peek definition functionality allowing you to edit css files while you're in html. My problem is that I work in ASP .NET Web Pages, using .apsx files to develop, which haven't got this feature.
Do you know if there is any way to enable this peek definition for .aspx files?

Do HTML5 development using grunt and bower with WebSite project or create HTML5 Web app in Visual Studio 2015?

I want to build a custom PURE HTML5 Web Template, for HTML5/CSS3/JavaScript single page application development, and then use that as a starting place for SPA HTML5 web development.
Microsoft clearly recommends using Web Applications, but provides NO pure HTML5 web application template, thus this task is left to end users.
I am not asking if I should use an ASP.NET Web Site or ASP.NET Web Application instead I am asking, what template configuration can I arrange that will let me use the most modern HTML5 tools and workflows, and is it the Web Application (with .csproj or .xproj project file) or Web Site project (a folder based project)?
For projects where a developer needs to build a pure HTML5 SPA, maybe with ExtJS or maybe with Angular, or something equivalent, the first choice made is between File-> New Web Site and File -> New Web Application.
If it may be that later my HTML5 project may get some ASP.NET added later, it is clear I should choose File -> New Web application, but there is NO HTML5 template provided, so I am looking to build my own Template and use that. But what should it be based on?
For the WebSite option, you click file New Web Site, and you get a folder-based project, but none of the new grunt/bower support.
I am looking for a way to get the best of both choices. Can I get grunt/bower support if I click File New WebSite? Or can I do pure HTML5 work somehow if I click File New Project?
It is possible to crib a pure HTML5 Web Development .csproj + .sln project together myself, starting with some examples that used to be on codeplex and are now on GitHub
It seems to me that the benefits of a .csproj or .xproj based root for pure HTML5 development are:
I can specify only the files I want to see in my project explorer.
I can easily add ASP.NET webapi controllers to my "pure" project without rebuilding the project.
Can I use one of the ASP.NET 5 (DNX) Web Application templates (.xproj), and just delete all the C# stuff, to get a working pure HTML5 development template, and retain all the new javascript grunt/bower tooling? Or do I have to stick with Web Site (folder level) projects, and their visual studio 2005 era website development features, for pure HTML5 html/css/javascript development?
Update: If close voters who voted "opinion" based would be so kind enough as to point out where I call for any opinion, that'd be great. I'm asking for help DEVELOPING a template for Visual Studio, and I believe that is on topic and not at all a call for opinion. To develop a template you must make a choice. Which one will provide the most complete HTML5 tooling including grunt and bower and full javascript syntax highlighting, jslint, bundle, minify, etc?
When developing a template, my research so far shows that:
Patience, grasshopper, it's early days. ASP.NET Core 1.0 just released, but does not include certain elements, including a new .xproj style set of projects for basic pure HTML 5 web project development (name not yet even announced, but let's hypothesize, it might be called Core Pages), whatever it is, the Microsoft "franchise reboot" for Pure HTML5 Development with Microsoft Visual studio either doesn't exist yet, or is in early stages of internal development. Whatever template I could make today might be obsolete in three weeks or three months if Microsoft makes a move here.
For now, for people who can live with it, File -> New Web sites works fine, and I haven't found any technical documented reason why you CAN'T use it for new development, just a caution from Microsoft that it might not be the best choice, if a File -> New Project template can meet your needs. You can see from the way that ASP.NET Core 1.0 today works (just in time automatic-recompile without rebuilding in ASP.NET Core brings a core feature of the WebSite world over into the WebApp world at last) that its new tooling and the new .NET Core features inside dnx and dnvm will finally "restore the Balance of Nature" that I feel has now been divided over the last 10 years by the WebSite/WebApp dichotomy. Not yet, but that's part of the core design elements I have understood from studying the ASP.NET Core architecture.
For ExtJS, the Sencha Ext JS plugin for Visual Studio provides a File -> New Web Site option, and this works fine. I downloaded and tested it yesterday evening and it works fine. If I want to invoke grunt or bower, or bundle and minify, or any other web-dev workflow task, I can do so manually using an external command prompt window as well. So while it might not be as shiny as I was looking for, it's possible to get work done. The Ext JS plugin provides full Ext class hierarchy code-completion, and starter templates for both pure HTML5 (via file New Website) and HTML5+ASP.NET (via File New Project). When evaluating their plugin I initially thought there was NO way to do a pure HTML5 app inside visual studio because I was totally unaware of the File New Website option, and thought (incorrectly) of this area of VS as deprecated.
For Angular SPA development INCLUDING .NET there is this template, and it appears you could use it and just not write any ASP.NET server side stuff if you wanted to do a pure HTML5 SPA.
I would probably suggest starting with the angular SP development template linked above and modifying it to subtract angular and insert ExtJS, or using the ASP.NET 4.6 plus ExtJS template provided by Sencha's IDE plugin, and just subtracting all the ASP.NET code from that template. I don't yet have a starter template suggestion for the ASP.NET Core 1.0 .xproj world yet.
It should be possible, and seems quite easy to use .NET Core and ASP.NET Core as a key part of the tooling for a pure HTML5 development environment. In particular "dnx web" is a useful way of locally developing, as it is even more lightweight than using IIS Express. It should be equally feasible to develop for HTML5 with "DNX web" (kestrel) as the lightweight static server for pure HTML5, and either a full Visual Studio 2015 project (either website or webapp), or using just a modern web-editor like Visual Studio Code.
I hope that other developers who are still confused, as I was about the now-10-years-long split-personality issue in visual Studio with regards to New Web Site and New Web Application, may finally see some light at the end of the tunnel.
Update: Q4/2016: It actually looks like the two way split personality issues in VS 2015 will get worse in VS 2016 (Currently in preview as VS15) because there will be THREE ways to open a project, open solution/csproj via one menu item, open web project via another, and open folder via a third.

Why can't a browser display a local ASP.NET file?

I wanted to build a web application that kids could view 4-H Record Book forms, criteria, and examples from a CD. I wanted it to be in a web page format so that it was platform-independent (compatible with Windows, Mac, and Linux). I wanted to write the application in ASP.NET, so that I could reuse pieces of my site (e.g. Master Pages, databound controls). It worked fine while in Debug mode running on my simulator server, but when I attempted to open the files without the server simulator, they simply displayed as blank pages.
I've learned thus far that ASP.NET requires a server to run, but my question is: why does it require a server when so much of ASP.NET is just HTML tags? Also, is there any way I can use ASP.NET features such as Master Pages and Databound controls on a local website?
Output of ASP.NET is html, css and other stuff, but ASP.NET itself is a very complex system that consists of many components, for instance code-behind classes, asp.net controls, event system, routing system, various libraries etc. The server has to somehow (I won't go into details, because it's a way too broad topic to explain like this) assemble the output and it will spit out the generated html, css etc. to the client who requested the file (typically a browser).
Browser itself can only work with final html, css, javascript and so on, but it can't do processing that needs to take place on the server-side.

Web reporting library which is not SQL ReportViewer

I deal with ReportViewer and RDLC since 2005.
Ever since that I am failing always in new troubles and problems, It most time working okay but also It sometime give me so much headache.
Common stricture for reporviewer for me is that only working as should work in IE.
So I start wondering is there time to look for other library which can replace ReportViewer.
Most of time I developing business apps, so called ERP.
I am looking for library which can be included in project written in C# asp.net web forms, can also use local resources as printer , paper properties and others, reports should be able to develop separately in different layer.
I know that there is Report Bulder for Delphi and I guest that there is other reporting library for asp.net C#. Does Crystal Reports can work on WebForms ?
Are there any other which can bi installed inside Chrome or Firefox as extension.
You can try our SharpShooter Reports. It is optimized for ASP.NET MVC however you can easily add it to any HTML page as it needs only several lines of JS code.

How to run .aspx file for a beginner

All,
I have very limited knowledge of .aspx and ultimately what I want to do is exactly this:
http://www.webonweboff.com/widgets/ajax/ajax_linked_selection.aspx
I appreciate the code is given in the link above, but I am only familiar with HTML and Javascript so when it starts to tell me .aspx and .cs code I get a little lost. Have done my homework and I guess i need to install something to run these programs. Naively, I only have notepad++ at the moment.
Any help would be greatly appreciated
Joe
Your best bet is to go to http://www.asp.net/downloads and click the big green Install Now button. This will use the Microsoft Web Installer to download everything you need to get started with ASP.NET development (including Visual Studio Express which will take the place of notepad++!).
Try installing visual web developer and create ASP.NET wesite in C#. You should be able to run these files.
http://www.microsoft.com/express/Web/
Also try going through these tutorials
http://www.asp.net/web-forms
ASPX is like CGI programming. Yes you need to install the ASP.NET developer studio in order to deploy your web application. It will then configure a default webserver on your local host where you can start playing with the code samples.