All Answers

0 votes

Hi Rene,

Please check-out the sample attached here.

Look at “test.aspx” page, to get the idea about calling Wisej WebMethod from JavaScript.

Also, look at Window1.cs, to see how to define a WebMethod.

For more information about this, please check out this old forum post at: https://wisej.com/support/question/how-to-call-c-function-from-pagesource-javascript

Best Regards and Happy Holidays!

Alaa

  • Alaa (ITG) answered Dec 24, 2024 - 10:37 pm
  • last active Dec 26, 2024 - 12:30 pm
0 votes

Hi Angelo,

Would you please zip the sample here, I tried it over from our GitHub repo but I couldn’t reproduce!

Best Regards,

Alaa

0 votes

Hi Rene,

Thank you for getting back to us!

We’ll look into this and get back to you ASAP!

Best Regards and Happy Holidays,

Alaa

0 votes

Hi Mgmst,

Would you please wrap up a small sample for us to check out?

Best Regards,
Alaa

0 votes

Mocha support all of the .net frameworks you mentioned.

I wrote a Hello World Wisej app and tried to publish it and get the same error.

I use Visual Studio 2022; select new project; select WiseJ.NET Desktop Application; create hello world; compile; publish get the same error.

I select WiseJ.NET Hybrid Remote Application, do the same and get the same error.

I’ve tried .Net 4.8, 4.8.1, 7, 8 and 9 and every time, I get the same error.

I really like Wisej for this function, but so far, I can’t get it to publish…

If somebody has a simple VB.NET / Wisej “hello world” or something that can be published, I’d appreciate testing with that code…

Thanks

 

0 votes

Hi
I suggest you should confirm with Mochahost which .NET versions they support. If their hosting environment does not support newer versions like .NET 7, 8, or 9, you’ll need to adjust your project to target a compatible version, such as .NET Framework 4.8
Also you can test your app with other hosting that support you desired .net version. I use somee  host and works perfect. (4.8 and 8)

If your app run good on your machine, is not wisej issue 🙂

Regards

  • Paul answered Dec 20, 2024 - 3:41 pm
0 votes

Hi Alex,

yes, it will try to activate over the internet.
Offline activation is only supported with higher-level license editions.

Best
Thomas

0 votes

Hi again,

I’m coming back to ask about the exchange of an existing active Server Community License with a new Express License.
Suppose I get a new key and replace the one existing in the web.config.

Won’t it try to activate it over the internet to produce a “wisej-server.lic” file? What will happen if the server is not connected to the internet?

Best,
Alex

 

0 votes

Hi,

can you please wrap up a test case? It’s not clear to me what setup of the columns etc. you are using.

Thanks in advance!

Best regards
Frank

0 votes

We are integrating an ASP.NET MVC application into our Wisej.NET application using the AspNetPanel component.

Currently, the MVC application, hosted locally, is successfully displayed within the Wisej.NET panel. However, the objective is to dynamically transfer data (e.g., SQL datasets, project file paths, or other parameters) from the Wisej.NET application to the ASP.NET MVC application. Wisej.NET Code (ListLabel_WebDesignerLauncher) Below is the initialization code for the AspNetPanel in our Wisej.NET application:

Wisej.Web.Form F = new Wisej.Web.Form
{
Height = 600,
Width = 800,
Text = “Web Designer”
};

// Create and configure AspNetPanel
Wisej.Web.AspNetPanel P = new Wisej.Web.AspNetPanel
{
Dock = DockStyle.Fill,
PageSource = “http://localhost:11278”
};

F.Controls.Add(P);
F.Show();

Currently, this implementation only loads the MVC application within a Wisej.NET form. Our goal is to dynamically pass data, such as SQL datasets and project file paths, eventually as JSON string, from Wisej.NET to the ASP.NET MVC controller for use in the MVC app.

ASP.NET MVC Code

Here’s the controller action in the MVC application responsible for initializing the Web Designer:

 

 

public ActionResult WebDesignerLauncher(string reportRepositoryID)
{
if (!RepositoryItem.IsValidItemId(reportRepositoryID))
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);

if (!GetCurrentRepository().ContainsItem(reportRepositoryID))
return Content(“The selected project does not exist”);

IDataProvider dataProvider = GetSqlDataProvider();

var options = new WindowsClientWebDesignerOptions
{
DataSource = dataProvider,
DataMember = “HauptTabelle”,
ProjectFile = @”C:\Path\To\Reports\MyReport.LST”,
ProjectType = LlProject.List,
VariableInitializer = variables =>
{
variables.Add(“RIC.Copyright”, “Firma”);
variables.Add(“RIC.Druckvorlage”, “MyReport.LST”);
// Additional variables…
}
};

return View(“WebDesignerLauncher”, options);
}

The WebDesignerLauncher action accepts a reportRepositoryID parameter to load the corresponding project file, initialize the Web Designer with datasets, and set variables dynamically. ASP.NET MVC View The MVC view renders the Web Designer using the provided model: @model WindowsClientWebDesignerOptions @Html.ListLabelMvcWindowsClientWebDesigner(Model)

 

Question

What is the best way to dynamically transfer data (e.g., SQL datasets, project file paths, or other parameters) from the Wisej.NET application to the ASP.NET MVC controller? Is there a direct way to set or get session variables? The issue could be solved with an http-Post with a big JSON in body. But it would be nice to have a more direct and efficient way.

0 votes

Frank,
Now it seems to work.
I see all the controls of my application and also the extensions installed (eg. fullcalendar), that were not visible before.
Only one problem remains about  the navigationbar extension.

Adding the nuget package ‘ Wisej-2-NavigationBar’ does not work and generates the error:

NU1202 Package Wisej-2-NavigationBar 2.5.32 is not compatible with net48 (.NETFramework,Version=v4.8) / win. Package Wisej-2-NavigationBar 2.5.32 does not support any target frameworks. Wisej.Buttons C:\ASRD\NET\WISEJ\GITHUB\EXAMPLES\Wisej 2.5\VisualBasic\wisej-examples-vb-2.5\Buttons_ok\Wisej.Buttons\Wisej.Buttons.vbproj 1

It worked fine before.
Any suggestions?

thanks

0 votes

Frank,
Now it seems to work.
I see all the controls of my application and also the extensions installed (eg. fullcalendar), that were not visible before.
Only one problem remains about  the navigationbar extension.

Adding the nuget package ‘ Wisej-2-NavigationBar’ does not work and generates the error:

NU1202 Package Wisej-2-NavigationBar 2.5.32 is not compatible with net48 (.NETFramework,Version=v4.8) / win. Package Wisej-2-NavigationBar 2.5.32 does not support any target frameworks. Wisej.Buttons C:\ASRD\NET\WISEJ\GITHUB\EXAMPLES\Wisej 2.5\VisualBasic\wisej-examples-vb-2.5\Buttons_ok\Wisej.Buttons\Wisej.Buttons.vbproj 1

It worked fine before.
Any suggestions?

thanks

0 votes

You are a genius!  Thank you for your fast response.  It worked perfectly!

0 votes

Hi Rusty,

this can be achieved by using the Wisej.NET ClientClipboard extension.
Please find attached a sample that you can adapt to your needs.

Best regards
Frank

0 votes

Hi Angelo,

can you please try to add this nuget package?

https://www.nuget.org/packages/Wisej-2-VisualStudioDesigner

Alternatively please try a full Wisej.NET 2.5 reinstall.

Best regards
Frank

0 votes

Hi Angelo,

Please proceed with installing the .NET Maui workload from Visual Studio, and also install the .NET 8.0 SDK!

Best Regards,
Alaa

0 votes

Hi Alaa,

Visual Studio has just been installed.

I did another test, I don’t know if it is related to the problem.
I downloaded one of the example projects ver. 3.5 from Github (for example Button).

When I try to open it, visual studio gives an error message about a missing file:

‘C:\ASRD\NET\WISEJ\GITHUB\EXAMPLES\Wisej 3.5\wisej-examples-3.5\Buttons\Wisej.Buttons\Wisej.Buttons.csproj : error  : SDK Resolver Failure: “The SDK resolver “Microsoft.DotNet.MSBuildSdkResolver” failed while attempting to resolve the SDK “Microsoft.NET.Sdk.Web”. Exception: “System.IO.FileNotFoundException: Could not find file ‘C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.android\WorkloadManifest.json’.

I attached an image of the error message

Thanks

0 votes

Hi Rene,

Would you please provide more information on this matter please?

Best Regards,
Alaa

0 votes

Hi Angelo,

Can you please try to repair visual studio?

It doesn’t look like an issue coming from us.

Best Regards,
Alaa

0 votes
In reply to: Variable of class

Hi Francesco,

The variable is going to be assigned whenever you create a new form, it will not become a session variable!

To use session variables, please consider using Application.Session[“cVar”] = “value”, or, for a more advanced implementation, please consider looking at SessionReference .

Best Regards,
Alaa

 

Showing 141 - 160 of 11k results