Syncfusion ASP.NET Web Forms diagram showing empty page in the browser while it is showing right diagram in design view of VS2019. I have installed version 194.0.48. Please Help. I am new to syncfusion so, don't know completely that what references are to be included in the web form. Here is code of my test.aspx file
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="testapp.test" %>
<%@ Import Namespace="Syncfusion.JavaScript.DataVisualization.DiagramEnums" %>
<%@ Import Namespace="Syncfusion.JavaScript.DataVisualization.Models" %>
<%@ Import Namespace="Syncfusion.JavaScript.DataVisualization.Models.Collections" %>
<%@ Import Namespace="Syncfusion.JavaScript.DataVisualization.Models.Diagram" %>
<%@ Register assembly="Syncfusion.EJ.Web" namespace="Syncfusion.JavaScript.Web" tagprefix="ej" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%: Page.Title %> - My ASP.NET Application</title>
<%:Styles.Render("~/Content/ej/web/default-theme/ej.web.all.min.css") %>
<%: Scripts.Render("~/Scripts/jquery-3.2.1.min.js")%>
<%: Scripts.Render("~/Scripts/ej/web/ej.web.all.min.js")%>
<%: Scripts.Render("~/Scripts/ej/ej.webform.min.js")%>
</head>
<body>
<form id="form1" runat="server">
<div>
<%-- Initializes Diagram--%>
<ej:Diagram ID="Diagram" runat="server" Height="600px" Width="900px">
<%-- Add the node to the nodes collection --%>
<Nodes>
<%-- Defines the basic shape and its properties --%>
<ej:BasicShape OffsetX="100" OffsetY="100" Height="70" Width="100"
BorderWidth="2" BorderColor="black" CornerRadius="1" Shape="Rectangle">
</ej:BasicShape>
<ej:BasicShape OffsetX="300" OffsetY="300" Height="70" Width="100"
BorderWidth="2" BorderColor="black" CornerRadius="1" Shape="Rectangle">
</ej:BasicShape>
</Nodes>
</ej:Diagram>
</div>
</form>
</body>
</html>
here is my test.aspx.cs file's code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Syncfusion.JavaScript.DataVisualization.DiagramEnums;
using Syncfusion.JavaScript.DataVisualization.Models;
using Syncfusion.JavaScript.DataVisualization.Models.Collections;
using Syncfusion.JavaScript.DataVisualization.Models.Diagram;
namespace testapp
{
public partial class test: System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
I have added the following code in web.config
<assemblies>
<add assembly="Syncfusion.EJ, Version=19.4460.0.48, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.EJ.Web, Version=19.4460.0.48, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
</assemblies>
<appSettings>
<add key="owin:AutomaticAppStartup" value="false" />
<add key="LoadEJResourcesFromAssembly" value="true" />
<add key="EJResources" value="jsrender:true;themes:true;" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true" />
<handlers>
<add verb="*" path="captimage.axd" name="syncfusion_generatetools" type="Syncfusion.JavaScript.ImageHandler, Syncfusion.EJ, Version=19.4460.0.48, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" /></handlers>
</system.webServer>
<httpHandlers>
<add verb="*" path="captimage.axd" type="Syncfusion.JavaScript.ImageHandler, Syncfusion.EJ, Version=19.4460.0.48, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
</httpHandlers>
Hi J.M
We have created a ASP.NET Webform sample with your code and provided the sample link below.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ASPNET~1-1031633830
Regards,
Shyam G
Hi J.M
Thanks for your update.
Regards,
Shyam G