We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Sample source code for asp.net vb

Can I have a sample source code for asp.net vb like below sample instead of asp.net core?

https://ej2.syncfusion.com/aspnetcore/Grid/DefaultFunctionalities#/material

1 Reply

PS Pavithra Subramaniyam Syncfusion Team March 29, 2019 09:14 AM UTC

Hi Keith, 
 
Greetings from Syncfusion. 
 
Query : Can I have a sample source code for asp.net vb 
 
We have analyzed your query and we have prepared a Syncfusion EJ2 Grid sample for your convenience. Please download the sample from the link below,  
 
  
We have prepared the above sample by following the steps below,   
1.       Create a VB MVC sample. 
2.       Install the Syncfusion MVC package (Syncfusion.EJ2.MVC5) by using the NuGet. Please refer the screenshot below, 
  
  
  
3.       Now add the following scripts and styles CDN links and ScriptManager in the “_Layout.vbhtml” file. 
  
@Imports Syncfusion.EJ2  
<!DOCTYPE html>  
<html>  
<head>  
    ...  
    <!-- Syncfusion Essential JS 2 Styles -->  
   <link rel="stylesheet" rel='nofollow' rel='nofollow' href="https://cdn.syncfusion.com/ej2/material.css"/>  
  
    <!-- Syncfusion Essential JS 2 Scripts -->  
    <script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>  
</head>  
<body>  
    ...  
    @Html.EJS().ScriptManager()  
</body>  
</html>  
  
  
4.       Add the “Syncfusion.EJ2” Assembly reference to the “Web.config” file.’ 
  
    <pages pageBaseType="System.Web.Mvc.WebViewPage">  
      <namespaces>  
        ...  
       <add namespace="VBSample" />  
        <add namespace="Syncfusion.EJ2" />  
      </namespaces>  
    </pages>  
  
We have used the following code to set the DataSource to the Grid. Please refer the code example below,  
  
[Index.vbhtml]  
                  
                @Imports Syncfusion.EJ2  
        @Html.EJS().Grid("Grid").DataSource(Model).AllowPaging().Render()  
  
[HomeController.vb]  
  
    Function Index() As ActionResult  
        BindDataSource()  
        Dim contracts = order  
        Return View(contracts.ToList())  
    End Function  
  
  
 
Please get back to us for further assistance. 
 
Regards, 
Pavithra S. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon