Is it possible to open a Silverlight Project within a button click event of another Silverlight Project?
i.e Silverlight Project A button click event to open Silverlight Project B.
From Silverlight you have control of the web page where you are hosting Silverlight Project A, even of javascript (so you can call a javascript method form within your Silverlight project A).
Also, you can host several Silverlight objects inside a web page, for an example, if you have a web project besides your Silverlight project inside your solution, you can open the .html file from this project and see the "" tag. That tag says that inside that page should be a silverlight object, so you can have any number of " ... " tags pointing to same number of silverlight projects (or project instances)
Here is an example:
http://blogs.microsoft.co.il/blogs/alex_golesh/archive/2008/07/10/quick-silverlight-tip-communicating-between-two-silverlight-objects-on-a-single-page.aspx
Related
I am developing a survey project which collects data from the client with Blazor WebAssemly for the Client-side. Each survey form will have a different design and edit-checked rule. So I decide when I create a new survey form, the application will generate a new *.razor page automatically, for example, ClientSurvey.razor page. Everything works well until I navigate the web application to the ClientSurvey.razor I just have created. The system shows error:
404 Not found.
I have to rebuild the project again, and it can show the ClientSurvey.razor page on my website.
With ASP.NET MVC before I don't have to rebuild the project when I add a new aspx page. Does it still work with Blazor WebAssembly? If yes, how can I change the razor page, and it can update on my website automatically without rebuild or recompile?
And I also meet a problem that when I deploy the project in IIS, I don't see where the UI (.*razor) pages are stored, I know they are compiled to dll. How can I keep them in raw files in the same way with ASP.NET work? With ASP.NET, when I deploy it in IIS, there is always a folder to store aspx pages.
Updated: please see the figure to more clearly
I am trying to consume a web service in windows application
but I am having some challenges.
I did that by right clicking on References -> Add Service Reference -> Advance -> Add web Reference .
When I enter the url of the webservice (http://server/webserviceName?wsdl), it rather opens the file download dialog box asking me to save or cancel , so I am not able to proceed.
Please any ideas? Kindly see screen shots
I tried this and it worked.It was a Java web service.
I added the ServiceModel as part of the references.
References -> Add Reference -> ServiceModel (under the .Net tab)
I created a solution with two webapplication project. One is asp.net mvc and second one is web api. Now I want to publish. Kindly suggest me how to publish my webapplication and webapi
all mvc pages, web api controllers and aspx pages can be added to single project, no need to different project, if you need to seperate business you can use areas and class libraries
Process 1 :
You don't need to create separate project for Web API and MVC application in a single solution. You can create a MVC application and add an WebApiConfig.cs (route for api) file in App_Start folder. Write the route for API,(you just need to copy your route from Web API project and paste here). Now you can add/keep your all Api controllers in Controller folder which must be inherited from ApiController. That's it!
Process 2 :
But if you want to keep in separate project in a single solution,
then right click on your solution -> click on properties -> It will open property page. Here select the Multiple Startup projects radio button -> Then you can set both MVC and Web API application as start in action column -> Click on Apply -> Then Ok.
Suppose your Domain name is example.com. Then you can publish your MVC application there. And create a sub-domain, for example, myapi.example.com, and publish your API there. Then enable CORS on API project.
I would recommend to go with Process 1.
If you want to know more about how to publish both project from a single solution, please check this link
I am using MVC4's WEB API to expose a controller.
Initially I created created a MVC4 WEBAPI project, set the project not to open any web page, wait for an external app to call the URL (WEB API). The project in VS2010 is set to run from IIS7 Express, not VS2010's Dev Server. This works OK, the browser prompts me to down load a file. Which is OK for me, as the browser does not know what to do with the returned data (RAW TEXT).
Next, I created an AREA in the MVC4 project area, then added a controller (WEB API type).
Then I once again ran the project and in a browser entered the the URL (WEB API). And it fails.
Ed.
The DefaultHttpControllerFactory doesn't work with Areas by default. To get this functionality you have to write your custom HttpControllerFactory.
You can find how to do this at the post How to create HttpControllerFactory to support Areas
While it is possible to place WebApi Controllers in different Areas, ASP.NET MVC 4 RC will still treat these ApiControllers as if they all reside in the same namespace. This is a limitation of the DefaultHttpControllerSelector, which is responsible for selecting the appropriate ApiController.
Fortunately, you can inject your own implementation of this class. In fact, I've already encountered this very issue and written an "area aware" HttpControllerSelector. You can find a blog post of mine about this issue and its solution here:
http://blogs.infosupport.com/asp-net-mvc-4-rc-getting-webapi-and-areas-to-play-nicely/
I have developed a sharepoint custom webpart. How do I show it in a javascript pop up when i click on a link at my share point site
create a webpart page first, deploy your webpart in this page and set your popup page as this
web part page.
from our project, we develop an application page and popup it instead of your way.