asp communication with flex - asp.net

i was developed one .net application. It contains flash animation in one of the asp pages. And i need to write action script code for playing and pausing that swf file. I am using flex builder3. However how can i execute the asp application from flex builder? How can i load asp page into mxml file? Any idea?

If you need to run asp code in your flex app, I recommend http://code.google.com/p/flex-iframe/
But, if you need to write code in your asp app to control the swf, you'd be looking at fabridge, which you'll find in your sdk frameworks directory (C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\frameworks\javascript\fabridge).

Related

How to instantiate a SaveFileDialog in a web application

I am new to Visual Studio and ASP. I have a web application in which I need to use SaveFileDialog. When I open the Dialogs group in the toolbox, all the controls including SaveFileDialog are greyed out. Is there an alternative method? I notice that in the Standard group there is a FileUpload control but it is not matched by an equivalent FileSave or FileDownload.
The FileSaveDialog is a windows UI control that can be used when developing native Windows applications. They are not possible to use in web projects that are run in any browser on any device.
To save a file from the web browser you can use JavaScript as described in Javascript: Create and save file.

Viewing a ASP.NET page inside Web Application Project without building the whole project

Is it possible to view the change of a page inside Web Application Project without building the whole web application project and its dependent library projects?
Thanks.
I don't think you need to build any referenced projects (unless you have made changes in them), but you will need to build the web project
That's the big advantage of the web site model, which supports partial compilation:
Well described here:
http://www.west-wind.com/presentations/aspnetcompilation/aspnetcompilation.asp
You can view the change of a page without re-building the whole project only if you change a front end of a page. After changing front end, save it, and then refresh browser. If back end changes, you will need to re-build the whole application.

VirtualPathProvider Not working in asp .net website project

Here is the scenario :
1) Created on Web Application project for reusable user controls
2) Created Main application where i want to load these controls dynamically (definitely from assembly)
The above scenario worked wonderfully well, as i have selected web application project for main application
but now i want to use same reusable control project in asp .net website project but its not working, it is providing me error like
The virtual path '/App_Resource/ReflectionControl.DUControl.ascx' maps to another application, which is not allowed.
Below is the steps which i have followed to do it...
Link
I have identified the issue... "/App_Resource/ReflectionControl.DUControl.ascx"
Here You need to provide path like "~/App_Resource/ReflectionControl.DUControl.ascx"
So, "~" was missing...it rocks.

Deploy asp.net application without compiling DLL

When I publish any type of asp.net application, my code is precompiled into various assemblies. I would like to avoid this so that I can upload an aspx page and its corresponding codebehind file. I understand the benefits of doing it either way, but what is desired here is the least risky way to publish changes.
How does one properly deploy an asp.net project without compiling assemblies?
Is the process different for each model (web app, MVC..)
Sounds like you have a Web Application Project, and what you want is a Website Project. With website projects, you can modify the aspx and codebehind files and not have to worry about recompliling them, asp.net will do that for you. Web Application Projects need to be compiled for every code change.

ASP.net: Website or web application project

Is there any difference between website and web application project? What if you are working on a project that is sort of hybrid of site and application? which project should you chose?
I'ld go the newer Web Application project (always, regardless of the size of the project).
There is nothing to lose and everything to gain with using the Web Application Project (you cannot say this about using the "website" only).
The official list of differences are here:
Use Web Application Projects when you
Need to migrate large Visual Studio.NET 2003 applications
Need to
control names of output assemblies
Need stand-alone classes to
reference page and user control
classes
Need to build a Web
application using multiple Web
projects
Need to add pre-build and
post-build steps during compilation
Use Websites if you:
Need to generate one assembly for each page.
Prefer single-page code model to code-behind model.
Prefer dynamic compilation and working on pages without building entire site on each page view (that is, save file and then simply refresh the page in the browser).
Want to open and edit any directory as a Web project without creating a project file
#Mehrdad's link here is essential if you want to know more http://msdn.microsoft.com/en-us/library/aa730880(VS.80).aspx#wapp_topic5
As for which project to choose, I would go with the Web Application Project, regardless of size. Having all of your code behind compile down into a single DLL is a major benefit for maintenance and security on the hosting end. I know there are precompile options for web site projects, but they seemed like more trouble that it was worth for me.
I know that the IIS filters are in place to prevent users from accessing your .vb or .cs files, but it still makes me a little leery.
But more important to this is the nice fact that if you make a bunch of coding changes, or maybe add some classes and change the processing logic, the only thing you have to merge up is the compiled DLL and nothing else. Similarly, if you do a few UI changes (say change the stylesheet or position of a few controls), you don't have to worry about recompiling the application, you simply bring over the update .aspx page and you're done.
Take a look:
http://msdn.microsoft.com/en-us/library/aa730880(VS.80).aspx#wapp_topic5
http://forums.asp.net/p/1300026/2538628.aspx
I'm used to create websites when I want to create a new webapplication.
My current project had some problems on compiling, so I switched to a webapplication project. The step isn't very hard. Visual Studio helps you to change all necessary lines.
Refer to the links in the post:
http://www.codersbarn.com/post/2008/06/01/ASPNET-Web-Site-versus-Web-Application-Project.aspx
Anthony :-)

Resources