Getting started with ASP. NET and flex interaction instances

Source: Internet
Author: User

Today, I decided to write a case study on ASP. NET interaction with Flex! For this interaction, I checked a lot of information and found that my eyes were blooming and my mind was excited! Finally, I was worried! Finally succeeded! Hey! Tiger does not make sense. md really thinks it's hello cat!So today I want to write a detailed tutorial for your reference! Reduce detours for beginners like me! As the saying goes: give roses, keep your hands fragrant!! Okay, you don't have to talk nonsense! Move

If you want to upload files to the server, we recommend that you use vs2005.
If it's just an internal test, you can choose this quick release.
        

1. Visual Web Developer 2005 express Edition
: Ftp://www.msuniversity.edu.cn/Express/VNS_CHS.iso

2. Flex bulider 3
: Http://trials.adobe.com/Applications/Flex/FlexBuilder/3/FB3_WWEJ_Plugin.exe
Registration Code: 1377-4868-2899-3328-2083-1968

3. fluorinefx v1.0.0.13.exe
: Http://www.fluorinefx.com/download/fluorinefx/1.0.0.13/fluorinefx.exe

4. Visual Studio 2005
: Http://www.pojiezhan.com/d/download.php? N = 1 & Server = url_1 & id = 2228: 1194414715

Note: The installation sequence is 1-2-3! If it is vs2008 or vs2005, you can build an interaction with fluorinefx as the middleware after the installation! You can jump to Step 5!

However, in this case, you must manually configure the ASP. NET quick version:

1. Start ASP. NET quick version
2. Create a website
 

3. Right-click and select-add reference
 

4. Find the net directory of fluorinefx's installation folder. Here is D: "Program Files" fluorinefx "bin" Net "2.0. Add these files.


5. Right-click and select F: "Kaka": Add the app_code of the ASP. NET folder.
Right-click app_code to add a new item --- create a helloworld class!

Run the page to get the address and port:Http: // localhost: 2943/Kaka(This will be used later! Important !)

Add the following to the helloworld class:Code:

Using System;
Using System. Data;
Using System. configuration;
Using System. LINQ;
Using System. Web;
Using System. Web. Security;
Using System. Web. UI;
Using System. Web. UI. htmlcontrols;
Using System. Web. UI. webcontrols;
Using System. Web. UI. webcontrols. webparts;
Using System. xml. LINQ;
Using Fluorinefx;
Namespace Tutorials. remoting
{
[Remotingservice ()]
Public   Class Helloworld
{
Public   String Sayhello ( String Username)
{
Return   " Hello, "   + Username +   " Greetings from Fluorine flash remoting " ;
}
}
}

Right-click the console. aspx file and select it as the start page.

Run the command to see

OK! The work on ASP. NET has come to an end!

Next, let's take a look at flex.

1. Set a new Flex project as follows:
 

The flex project file is saved in the Asp.net project folder. In this case, the flexweb directory under the Kaka folder is used!
Next
 

Web: webroot: directory of the Asp.net Project
      Rooturl: the port and address mentioned above
      Context root: it is the sub-folder of the rooturl directory. (in this case, Kaka is set to Kaka! For example, flex3 is flex3)
      ThenClick it! If the settings are correct, the following message is displayed:

The Web root folder and root URL are valid
      Next-finish!
2. The mxml code is as follows:

<? XML version = "1.0" encoding = "UTF-8" ?>
< MX: Application Xmlns: MX = "Http://www.adobe.com/2006/mxml" Layout = "Vertical" Backgroundgradientalphas = "[1.0, 1.0]" Backgroundgradientcolors = "[# 72e4cd, #336a90]" >
< MX: remoteobject ID = "Service" Destination = "FLUORINE"
Source = "Tutorials. remoting. helloworld" Showbusycursor = "True"   />
< MX: textinput ID = "Txtname" />
< MX: button Label = "Say hello" Click = "Service. sayhello (txtname. Text )" />
< MX: Label Text = "{Service. sayhello. lastresult }" Fontsize = "18" />
</ MX: Application >

3. The next step is

3. Run flexProgramLet's look at the Mozi effect!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.