connect vcsharp windows form application with asp.net - c#

kindly tell if there is any way to solve the connectivity of the vcsharp with asp.net. as i am trying to run the c# windows form application on asp.net to make my website more knowlodge able. Is there any other connevtivity option besides aspnet.

You can run web application in windows Forms application. You may embed the WebBrowser control. It makes sense, but if you want to run desktop application in a asp.net web this doesn't make sense IMO.
If you want to benefit from Rich Controls behaviors, you have web widget available within jQuery UI, BootStrap, etc.
Don't mix things
EDITS: According to your first comment, I'd suggest you to search for the web sdk for arcgis or an equivalent. Or You may need to reference dll available in the SDK and use web controls to display data
Plz read this

Related

In a ASP.NET Webforms App - The purpose of Site.Mobile.Master and the ViewSwitcher.ascx control

I normally delete ViewSwitcher.ascx and Site.Mobile.Master from my project whenever I create a new WebApp using the default Webforms template.
After researching I believe the Site.Mobile.Master and ViewSwitcher.ascx are used along with the new Friendly Urls feature.
I am looking for some information on why Microsoft added these files to the default webforms template and how/when I would go about using them. I usually create web applications that run on both desktop and mobile using the same master page.
It seems like a scenario when I would want to use Site.Mobile.Master is when I want to completely separate mobile from desktop. Meaning I would have 2 files like this:
AboutUsMobile.aspx (uses Site.Mobile.Master)
AboutUs.aspx (uses Site.Master)
I believe the ViewSwitcher control simply allows the user to leave mobile and switch to the desktop page.
However, I do not understand what logic is in place to automatically take the user to the Mobile page vs the Desktop page.
I just feel like I don't see the full potential in using these controls and how they work with the new URL routing. Any information on these items would be great.

Want to run WPF application on Asp.net web application.

I want to run my WPF application on asp.net web application. Actually I have a WPF page.xaml which contain the image viewer, which actually open image and edit it as required.
Now I want to embed that in my Asp.net Web application. I have a asp.net web application user control on which I want that WPF stuff. I research on it on the internet, I find a way that we first publish the WPF application on the IIS server and then past the URL in asp.net web application page iframe. as I follow this below link:
http://msdn.microsoft.com/en-us/library/aa970060.aspx#deploying_a_xbap
now I not want to follow this approach. I want an alternate way of this. Is there any way to handle this scenario. If yes then how can we achieve this?
Yes there's a better way: you can use Silverlight (basically it's a C# equivalent to Flash).
Even if Silverlight is quite the same as WPF, there is some differences due to the fact that silverlight is made for web. So you'll have to make some changes to your application.
About integrating it in your page, it seems quite simple:
You can use an object html element (as you would do with Flash)
Here are some links about that:
http://msdn.microsoft.com/fr-fr/library/cc838145(v=vs.95).aspx
http://www.c-sharpcorner.com/uploadfile/raj1979/host-silverlight-in-Asp-Net/
2 years later, a possible answer appears! Maybe someone else will see this and get some use out of it.
I have been hearing rumors that it is possible to run your WPF application in a browser, it's called an XBAP?
https://msdn.microsoft.com/en-us/library/aa970060%28v=vs.110%29.aspx
I am about to give this a try myself, I'll update this answer with any limitations I find.

How to test Web UI of a Web Browser control inside a WinForms application?

We have a web application that can be tested using Selenium, but that's not enough because the web application will be used inside a WinForms application using the Web Browser control.
The WinForms app interacts with the content of the page hosted inside the Web Browser Control and viceversa.
We have tests on other layers like services, but we need to find a way to test the WinForms UI that interact with the Web Browser control.
Any suggestion?
In addition to the link which Myles kindly provided, I also blogged specifically about calling the WebBrowser control from C# WinForms applications here:
http://matthewskelton.wordpress.com/2007/04/21/calling-javascript-from-c/
Specifically, you can use Type.InvokeMember() to call JavaScript from C#.
In terms of testing this, I suppose you'd need to drop a JavaScript listener/logger into the DOM, hooking it onto a low-level event or prototype, and then log out to the JavaScript console.
What you need is a WinForm test automation. A friend of mine blogged about this recently; http://matthewskelton.wordpress.com/2012/01/08/test-automation-tools-for-winforms-desktop-applications/

Can ASP.NET Page use WPF Controls?

I was wondering if ASPX page can use WPF Controls (from the toolbox in the designer)?
Because I have a custom user control that I made for a application before but now i am creating a web app. In the web app the controls were grayed out.
I was wondering if there is a way to use the user control in the web app?
Unfortunately, you'll have to create a new ASP.Net control that mimics your WPF control. The two technologies have completely different approaches to rendering (DirectX primitives vs. HTML), events (Routed events vs. Postbacks), etc. and are simply not compatible.
That being said, converting a WPF control to a Silverlight control is doable, and would allow you to leverage your previous work. You would still need to run it through a Silverlight app, though, rather than directly through the ASPX page.
ASP.NET is primarily a server side framework and WPF applications run on the client, therefore they don't really work well together. You might find it easier to convert the WPF control into a Silverlight control instead and pass that through your ASP.NET page. Users will need a Silverlight plugin to run it.
These two posts might help in the conversion:
Porting from WPF to Silverlight: The Missing Pieces, Part 1
Porting from WPF to Silverlight: The Missing Pieces, Part 2

c# hosting a usercontrol in IE

Our web page is only available internally in our company and we am very intrested in being able to offer interactive .net usercontrols on our departments website in the .Net 2.0 enviorment. I have been successful with embeding the object as so:
<object id="Object1" classid="http:EmbedTest1.dll#EmbedTest1.UserControl1"
width="400" height="400">
<param name="TestStr" value="Test Param String" />
</object>
The control worked just fine and the value was passed to the control without issue.
But I had a problem with passing subsequent values back to the embedded control
attempt to Recieve event from control:
attempt to update control:
<script type="text/javascript">
function UpdateStr()
{
Object1.Text = "update string";
}
</script>
Reference:
http://www.15seconds.com/issue/030610.htm
http://windowsclient.net/articles/iesourcing.aspx
Questions:
Is this technology outdated? - if so is there a replacement
Should I just work with action script instead of trying this?
I have got this to partially work and I was attempting to connect to a webservice that I have running and I got many security exceptions...I didn't get the same exceptions when I used action scipt2 in the same manner?
(side note : - how do i paste html script examples?)
Thanks.
Brad
Not out-dated so much as rarely used, and IE-only. If you want web-like deployment for desktop apps, use ClickOnce. If you want C# code that runs in the browser without security issues, use Silverlight. You could also look at XBAPs, which are sandboxed WPF apps that run in the browser, works on IE and Firefox, but requires the full .NET to be installed client-side, whereas Silverlight does not have this problem. Bottom line: look at Silverlight.
That's certainly an option. If you're more familiar with the Microsoft stack, you should try Silverlight, where you can code C# against a subset of the .NET framework right inside the browser.
We've used .NET controls in web pages internally and had a wide variety of strange issues, mostly related to scripting or security. Hard to determine the problem without more information.
p.s. write all code examples using the <pre> tags. There's a "code sample" button on the toolbar.
If the things that you are doing with the Windows Controls could be done with ASP.NET web controls instead, I recommend that you consider switching. You'll have much better control over the exchange of info from the client to the server.
1, 2) Yes it is outdated. If you want to work in .NET (and you're bent on having a control rather than an ASP.NET-style page/site), give Silverlight a try instead.
3) .NET code running in the browser is subject to very strict security controls (can't call back to a web site it didn't come from, for example).

Categories