How to pass data using dll between projects [closed] - c#

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a solution that has two projects, Windows Forms and Web API. I need to pass some data that I've collected in windows form to Web API, is it possible using dll, if so how?
How can I start the Windows Forms from the Web API?
thk

the concept of DLL File is to link your program with a shared library that has its functions, methods, etc. to be reused with your piece of code..
You can't really pass "Data" through a DLL file, however, the simplest way to pass simple data from one program to another is using Input/Output files, you can just Write your data in a text file with the first Program (in this case the Windows Form) and read it with the second one (the Web API)

Related

Is there a cleaner way to merge C++ and C# [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have an application i have designed and built in C# that uses some complex filtering. i have manually calculated filter values/parameters outside of my application and added them in. this method works temporarily, but ideally i want to generate my values inside my application. The values i generate come from C++. so my thought process is to create a standalone C++ application that i run from my C# application and generate the new values and save them into some .txt file that will automatically add the new filter in. is there a better way to do this without converting this code into C#?
Off the top of my head, here's a few ideas:
Like you suggested, you could save the values to a text file, and then read them in.
You could make the C++ program into a server, and connect the C# program to the C++ program over a TCP connection.
You could use a database like SQL Server to store the values.
I'm sure there's other ways to do it, but those are what came to mind.

How to create report with PDF using WCF Service in C#.net? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have created WCF Service. I have want to provide functionality to create Order Report and PDF of that Order Report.
Currently I have details of Order(OrderID, CustomerName, Product details etc). I want to create Report on the base of the order details and create PDF. I want to return that PDF in bytes to user who call the service.
So flow will be like this
1- User will provide Order details
2- Service function will create Report and PDF of it
3- Pass the PDF in bytes as return.
For step-2, I can use any open source tool which support in VS 2013.
Can anybody suggest me steps or give me hint to start work on this?
We are using iTextSharp library in many projects.
Write a small prototype and try to include every case you have: e.g. horizontal lines across your document.

Is it possible to run an EXE from MVC site? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Is it possible to call an exe from a MVC site?
I've seen this link. (I'll try it tomorrow in the morning when I get in the office)
Stackoverflow link
However I wanted to know if I cam barking up the wrong tree.
I have a 3rd party app that provides us a stand alone exe. Instead of sending this exe to x amount of clients. I would like to keep that exe on my web server so I can control who can use the exe.
Is this is viable option?.
You might find the responses to this old question helpful. If you are trying to run an exe file within your application, I think this would be the approach to take.
If I have understood your question wrong, and you are trying to provide users with a link to download an application, or a link to launch an application that already exists on their computer, then you will probably want to look into the html <href> tag.

Generating forms that use an MVC Web API [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am developing an interface that customizes and generates forms for customers to use on their own site. When a user logs in to the interface, he can create a form, add or remove fields from existing forms, and the system will generate the file.
I want to know what's the best approach for doing this. Making these forms independent and just use HTML/Javascript? or have them part of the overall MVC solution inside a Views folder so it can have server side code?
Probabily the best way is not to store the entire form, but having some metadata that describe the forms, then generate the gui dynamically. There are many ways to doing this, it basically depends on your skill, and your specifics, personally im developing something similar right now and i chose Angular2.
Here an example:
https://angular.io/docs/ts/latest/cookbook/dynamic-form.html

Use Global Resource file in external js file using jquery [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I 'm devleloping web application using .NET. Here i m facing 1 issue.I want to get value from global resource file in external .js file. If any one knows the solution can help me.,
Thanks in advance
Jey
Just as an solution, you can make web service on web application side, that will return localization value for key in request. And then you can get it via Ajax from your external js file.
Or other way is to generate needed localization values as javascript variables during page rendering, and then you can use it in the same page.

Categories