I'm currently evaluating tool options for Voice XML development. I'm currently seeing if existing web development tools will work, since the model is quite similar (markup sent to browser client, ECMAScript in the browser, pages on web servers, etc.). I know I can use aspx pages to generate non-html markup, but I'm wondering if there is a way to get the IntelliSense to work the same way it does if you were editing an XML file in Visual Studio?
You can add intelligence support for any kind of xml document by adding it's schema definition to XML\Schemas folder of VisualStudio.
if you are asking of combining VoiceXML and ASPX markups together in an .aspx files i think it would not be possible in that way. i think it requires a new ViewEngine (for example something like Razor is doing that by combining Razor-Markups & HTML)
Related
I've been asked to make some changes to an old ASP site, and I've been editing individual ASP files in VS (I don't have the original project file). However, I'm finding that none of my favorite ReSharper actions (like Selection Extend/Shrink) are firing while editing that individual ASP file. I know this feature is supported in ASP, and they work when I'm editing C# files as part of a larger project.
Do these features only work when the ASP file is opened as part of an ASP.NET project? Is there something else incorrectly configured?
I'm using R# 7.1.3 C# Edition and VS 2012 Ultimate (11.0.61219.00). Thanks!
Update 1
I just tested opening a C# file from VS without opening the C# Project file. I was NOT able to use the ReSharper features. Perhaps a project file truly is required?
ReSharper doesn't know anything about Classic ASP, which means there's a lot of functionality it just can't implement. For example, "extend selection" - extend to what? Because it doesn't know what the file format is, it has no way of knowing what code construct the selection should be extended to.
In a similar vein, it can't offer full functionality for known file types, such as C#, unless they're in a project, because the project gives it so much context. For example, all the types you're using are defined in assemblies that are referenced in the project, so without a project, you don't get the assemblies, you don't get any known types, so you don't get code completion.
I was wondering if there is a way to convert and HTML template to ASP.NET? I am trying to convert a website template that was written in HTML that contains Javascript and CSS files to ASP.NET so I can connect to a SQL Server database.
I have limited coding experience with ASP.NET so any help is appreciated!
I also have access to an ASP template but it is not ASP.net unfortunately.
I'm afraid to say you are going to have to get familiar with .NET for this however I like many others had to do this back in the day... although now you have many other factors like are you going to migrate to a Webforms based ASP.NET application or an ASP.NET MVC application.
You can just put your HTML content into an .aspx page however you are going to have to learn the fundamentals of .NET and perhaps things like ADO.NET, LINQ to SQL, nHibernate to get connected to a database.
This may help, but it is rather old: http://www.asp.net/web-forms/videos/migrating/migrating-from-classic-asp-to-aspnet
Microsoft do have a lot of information to help you make this transition... http://www.asp.net/get-started
Not the best answer I realise but you will have to take on a bit of a learning curve, and who knows, you may end up loving .NET, C#, VB, etc, etc... Trust me, it won't be that hard!
There's no easy way to do what you're asking. You can save it as a .aspx page instead of .html, but you can't magically make it connect to the database without coding adjustments.
Just create a new aspx page and copy the content to the aspx file. You should not face any issue in keeping original Html tags in aspx page, but if you need to do some sort of logic on cs file then you might want to change the Html tags to asp tags. which, again should be easy.
And to connect it to database, may be you would like to connect it from cs file.
I have been doing dynamic PDF creation via ASP.net for some time -- in the form of HTML to PDF conversion. It works well for us, but we have accessibility requirements from the State to make everything is accessible. For static PDFs, we simply "tag" the files manually using Adobe's accessibility tools. Of course this does not work for dynamically created files. PDFs that I create dynamically fail the Acrobat Pro Accessibility test.
Does anyone have any ideas about create PDFs dynamically in ASP.net, but producing PDFs that are tagged and can pass the Adobe Accessiblity test? I have researched many components, but none that I have found support tagging.
Thanks.
I would look seriously at iText. AFAIK, this is the definitive library for creating dynamic PDF's, for Java and .NET.
You will need the book iText in Action.
Here's a quote from iText in Action on accessibility:
"You can use iText to create a document that passes all the criteria that are listed in Section 508."
Everytime I view the source of ASP.NET website I found alot alot of HTML markup generated. I even tried Visual web Developer and design a simple page and then do the same thing with PHP and I found ASP.NET generates more HTML!
Now, how can ASP.NET be faster if it is generating HTML in this way!
Template generation is a very SMALL cost compared to other things that are going on in a web request. ASP.NET offers a lot more than a straight up PHP page (Session/State management etc) and injects additional markup into the response to help with this.
However, your question in general isn't really a question, if you were to take sometime to understand the difference between a web framework and a language.
ASP.NET controls generate extra markup in exchange for "easing" development
can i have some general advice on converting a classic asp site to asp.net? i've never worked with classic asp before and have only worked with asp.net 2.0 for the past 6 months or so, so this is completely new to me.
i noticed that this site i'm wokring on uses a few 'include' files. i know i should probably take the code from the include files and copy them into their own class files. i've notice that there is no code behind file, that each page is written in it's own file (markup and code). also, and this is kind of throwing me off, there are no event handlers. are there any other helpful nuances between classic and .NET you can mention?
one more question: i've notice in each file in my project that there is some code that is written above the markup, and some more below the markup. it seems it would be better if ALL the code was written above or below the markup, for organizational/readability purposes. unless, there's a reason for this. ???
thanks.
You certainly have a challenge on your hands. As far as comparisons are concerned, MVC is probably closer to classic ASP as it doesn't attempt to abstract the web into an event based structure - but that would just be another thing for you to learn.
Classic ASP is a completely different beast to ASP.NET as you're finding out. Basically each URL resolves to a parent ASP file. That in turn includes other ASP files (they can have different extensions if developer felt like it i.e. ".inc"). These in turn can include other files. It is entirely possible to have the same file included several times - generally ASP engine copes with this however. It is important to remember that all includes are processed to make one big document before any actual ASP processing starts. So once all the includes have been processed, you have one big document. The ASP engine then starts at the top and processes the code line by line. You'll probably have HTML and ASP code all inter-twined, with calls off to proceedures.
If you can program C# or VB then reading an ASP file with that in mind shouldn't be too difficult. At that stage you can begin to tackle the functionality one page at a time. Just remember that in ASP there is also no "post back" or view state concepts. Again this is ASP.NET trying to abstract web programming to represent an event based approach.
Sorry one last thing - some commands such as option explicit in ASP must be the first thing in the parent ASP document, so that must always appear before any other code or markup. After that code and markup can be mixed intogether - resulting in the infamous "tag soup" that ASP will be remembered for.
Take your includes and categorize them:
1) Code functions
2) Template functions
All code functions should be dropped into business object classes or modules. The template functions should be placed into user controls and sequently master pages. I strongly suggest the use of master pages in controlling the templated look of your new project as it will save you a lot of time in managing the site and transferring all of the actual page functionality into the new pages.
ASP is a scripted language where as Asp.Net can be either scripted or compiled. I would recommend choosing a Website Project because this will give you the greatest flexibility in deploying the minutae of the code. A Web Application project will compile everything into a singular .dll file which is easy to deploy, but it leads to a lot of regression testing if/when page code intertwines.
Once you have a templated structure, common classes, data access layer and masterpage/usercontrol structure established, it just becomes a task of going page by page and converting it over to the new code.