Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

A few noob questions to begin with... #575


User avatar
0
alukaszewski created

I have been prototyping a web application using VS2013 with .aspx pages and vb.net, using the metronic theme and things have been going well. I use Metronic datatables, ajax calls, google charts and morris.js. I now need to start looking at migrating my project into the ASP.NET Zero framework and this looks to be quite complicated! I expect I will have a lot more questions, but here are a few I'd like answering to get me started.

  1. Is there a guide for creating new pages accessed via the menu on the dashboard page in the MPA model? Are there any template pages to work with other than the dashboard page? Do I need to create new folders under the mpa/views or just new .cshtml pages within "dashboard"
  2. How do I add language-neutral/common language items to the navigation menu without having to use the L("item") function? For example, if I simply wanted the text "Microsoft" or "Symantec" as menu or item title?
  3. What is the version of the Metronic theme in the current ASP.NET Zero project? 4.5.2? I tried this version in my own environment and found that the datatables do not seem to render correctly anymore - the first column in the row does not highlight when you hover over a row.
  4. When I want to publish to a web server using VisualStudio, is it just the ProjectName.Web project I publish?

A lot of this is very new to me, but I am trying to move away from the traditional .aspx web page coding.


3 Answer(s)
  • User Avatar
    0
    doubledp created

    Hi,

    I am also fairly new to using the ASP.NET Zero template project and the ASP.NET Boilerplate framework so I will answer as best I can.

    1. Is there a guide for creating new pages accessed via the menu on the dashboard page in the MPA model? Are there any template pages to work with other than the dashboard page? Do I need to create new folders under the mpa/views or just new .cshtml pages within "dashboard"

    Here is a link with a tutorial on developing the MPA version: [http://www.aspnetzero.com/Documents/Developing-Step-By-Step-MPA])

    I develop using the SPA version, but I would imagine that there would also be pages for Users, Roles, Tenants, AuditLogs, etc for the MPA version. In terms of new folders; I would suggest that you do create separate folders for your different application function areas. This will keep your project structured and organised.

    How do I add language-neutral/common language items to the navigation menu without having to use the L("item") function? For example, if I simply wanted the text "Microsoft" or "Symantec" as menu or item title?

    L("string") is just a method that will translate the string based on your localization setup, so I am sure by omitting the call to the method, it will be treated as a normal string.

    What is the version of the Metronic theme in the current ASP.NET Zero project? 4.5.2? I tried this version in my own environment and found that the datatables do not seem to render correctly anymore - the first column in the row does not highlight when you hover over a row.

    Yes Metronic v4.5.2 is being used ASP.NET Zero v1.6.1 I can't speak for the use of datatables, as I am using ui-grid; so maybe the architect of this framework and project template could shed some light on this for you.

    When I want to publish to a web server using VisualStudio, is it just the ProjectName.Web project I publish?

    Can't really answer you on this one, as I am still in development and would also like to know what would happen to the WepApi assembly as the APIs gets generated dynamically. For the other assemblies I would imagine that they will be included in the Web assembly during the publishing of the project. Again the architect is best suited to answer this.

    One thing could be a bit of a concern to you and that is that this framework and project template has been written in C#, so it might be a bit of struggle for you to get everything to work accordingly if you intend on using VB still. From what I understand is that you can mix C# and VB.Net, but only in the same solution, it cannot be part of the same assembly.

  • User Avatar
    0
    alukaszewski created

    Thanks for your reply DoubleDP,

    Instead of L("string") if I just use "string" the project will not run/build and the editor shows a syntax error. If I use L("Microsoft") then the menu shows [Microsoft] instead of just Microsoft !?

    Yes, the adjustment to C# may be a little tricky, but most of my custom code is JavaScript so I should be able to survive. I do have some WebService .asmx in my prototype that returns JSON data if you pass it the name of a .sql file or SQL query and I think what I will do with that is keep it as a separate project in VB.NET.

    My project is fairly simple, so I'm hoping most of ASP.NET Zero I can leave alone and not have to worry about learning how it intricately works, or have to learn C# too much, I just want to throw in a good few dozen pages into the Mpa model each linked by the menu system or urls within each other. In my prototype, I centralised the whole navmenu into a single .ascx User Control and called this from each page, with a tiny JavaScript running on each page to set the desired menu item as "active". I am glad to see that the ASP.NET Zero project centralises the menu and takes care of this for me.

    I hope some of the more advanced forums users might help us in overcoming some of these first hurdles in using ASP.NET Zero.

    Thanks!

    Andy

  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    If you are moving a web forms (.aspx) to MVC, you should almost re-write your application (at least the UI layer) since they are completely different architectures. Beside that, AspNet Zero has it's own architecture. We can help you for AspNet Zero specific stuff. Since AspNet Zero uses standard tools (like ASP.NET MVC, EntityFramework, AutoMapper...) you can also find most answers out of this forum.

    Also, why don't you use SPA (Angularjs front end). It's more modern and with AspNet Zero approach, you will even no need to write/learn ASP.NET MVC or Web API (since ABP framework automatically creates Web API layer and also you don't need to write any MVC Controller or ViewModel).

    I strongly suggest to read also ABP documentation (<a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents">http://www.aspnetboilerplate.com/Pages/Documents</a>) to learn the architecture and API and take advantage of it.

    For your questions;

    How do I add language-neutral/common language items to the navigation menu without having to use the L("item") function? For example, if I simply wanted the text "Microsoft" or "Symantec" as menu or item title?

    It waits an object that implements ILocalizableString. FixedLocalizableString is another implementation which is simply returns the same text. So, use

    new FixedLocalizableString("Microsoft")
    

    instead of L("Microsoft").

    What is the version of the Metronic theme in the current ASP.NET Zero project? 4.5.2? I tried this version in my own environment and found that the datatables do not seem to render correctly anymore - the first column in the row does not highlight when you hover over a row.

    AspNet Zero's 1.6.1 is compatible with Metronic 4.5.2. But not all css/js added to the project and script/style bundle. You may need to add other css/js in order to use datatables. You can download Metronic from <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/releases/tag/v1.6.1">https://github.com/aspnetzero/aspnet-ze ... tag/v1.6.1</a> and get needed files. We used jTable (in MPA) for grids so far.

    When I want to publish to a web server using VisualStudio, is it just the ProjectName.Web project I publish?

    Yes, just .Web project.