You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It allows you to write ASP.NET (both MVC Core and Razor Pages) applications with VB.NET including designing the views with vb.net code embedded in XML literals (which VB.NET supports)!
6
8
@@ -9,16 +11,17 @@ Read about [Vazor history](https://github.com/VBAndCs/Vazor/blob/master/A-Vazor-
9
11
10
12
# Project and Item Templates
11
13
To easily crate Vazor apps in VS2019 and VS2022:
12
-
Download this VS Extension [VazorEx](https://marketplace.visualstudio.com/items?itemName=ModernVBNET.Vazor), and Double-click the file `VazorEx.vsix` to setup these Vazor templates.
13
-
1- A Vazor project template for ASP.NET MVC Core 6.0 .
14
-
2- A Vazor project template for ASP.NET Web Pages Core 6.0 .
15
-
3- A VazorView item template to add a new vazor view (.vazor and .vbxml.vb files) to the MVC project.
16
-
4- A VazorPage item template to add a new vazor page (.cshtml, .cshtml.vb, and .vbxml.vb files) to the Razor Pages project.
14
+
Download this VS Extension [VazorEx](https://marketplace.visualstudio.com/items?itemName=ModernVBNET.Vazor), and Double-click the file `VazorEx.vsix` to setup these Vazor templates:
15
+
16
+
1. A Vazor project template for ASP.NET MVC Core 6.0 .
17
+
2. A Vazor project template for ASP.NET Web Pages Core 6.0 .
18
+
3. A VazorView item template to add a new vazor view (.vazor and .vbxml.vb files) to the MVC project.
19
+
4. A VazorPage item template to add a new vazor page (.cshtml, .cshtml.vb, and .vbxml.vb files) to the Razor Pages project.
17
20
18
21
After installation:
19
-
1- open VS.Net and create a new project. In the search box, write Vazor, and choose one of the 2 vazor project templates.
20
-
2- In the project created, right-click a folder in solution explorer and select Add/New Item.
21
-
3- From the dialoge box select VazorView (if this is an MVC project) or VazorPage (if this is a Razor Pages project).
22
+
1. open VS.Net and create a new project. In the search box, write Vazor, and choose one of the 2 vazor project templates.
23
+
2. In the project created, right-click a folder in solution explorer and select Add/New Item.
24
+
3. From the dialoge box select VazorView (if this is an MVC project) or VazorPage (if this is a Razor Pages project).
22
25
23
26
# Html5 Auto-Completion in Vazor:
24
27
VazorEx also installs an Html5 CompletionProvider.
@@ -27,7 +30,7 @@ It provides Html5 auto completion in VB XML literals:
27
30
The auto completion is enabled only when XML root is `<vbxml>` or `<zml>`:
28
31
```VB.NET
29
32
Dimx=<vbxml>
30
-
<!—autocompletionforHTML5isavailablehere-->
33
+
<!—autocompletionforHTML5isavailablehere-->
31
34
</vbxml>
32
35
```
33
36
@@ -141,7 +144,7 @@ End Class
141
144
In vbxml code you can follow these rules:
142
145
* XML literals have only one root. So, it you don't eant to add extra html5 tag to contain the page content, wrap your code in a `<vbxml>` tag.
143
146
* All html tags and their attributes can be represented in XML, but there is no intellisense support for them until now.
144
-
* Use Razor conventions and tools, like helper tags, sections, partial views, scripts… etc.
147
+
* Use Razor conventions and tools, like helper tags, sections, partial views, scripts… etc.
145
148
* Use `<%= VBCode %>` to insert vb code.
146
149
* You can use @VBCode, but vb will consider it as a plain text, so you will have no intellisense for it, but it will be evaluated by Razor in runtime. This is why you must use c# syntax for expressions written after the @ symbol.
147
150
* Use inline-invoked lambda expression to imbed code blocks, like given in the above sample.
0 commit comments