Friday, October 23, 2009

Use DW-MX to make ASP.NET show with delete (1)

The brunt product Dreamweaver of Macromedia company upgraded!

This time Macromedia company used to name brand-newly: Dreamweaver MX

Listen to a name to feel pretty cruel, of course his function also is same cruel Oh! Respect of Dreamweaver MX backstage not only can use former Asp of UltraDev place support, Jsp, ColdFusion develops a technology, now is the support that adds pair of PHP, ASP.NET and Coldfusion MX more, the choice leeway that everybody develops to network tiring-room is more, happy! Should learn nevertheless but true many, the MX that prepares you begins!

This try out the.NET part operation of MX, he raises those who hold.NET to accuse partly be like: Datasets, DataGrid, Datalist, although still insufficient and agile, but it is after all good germinant ^_^

Dreamweaver MX is used to combine SQL Server database to do a data to show list and the page that delete below, these very foundation, basically be to let everybody feel the.NET below MX environment is developed.

One. Of course you want already the moving environment that compose built NET

2. Undertake to site catalog Web is shared (these are UltraDev foundations here was not told more)

3. Database structure

Use SQL Server database this, those who use is me in server of this locality database " New " in the library " jest is expressed " , 3 fields are shared inside, data type pursues as follows, among them " serial number " field " label " attribute is " be " ;

4. Compose proposes a site, should use here only " Server Model " server mode needs to choose to be " ASP.NET C# " ;

 

5. Copy DreamweaverCtrls.dll accuses

Turn to site window to fall, build " Default.aspx " page;

Open " Application " window, you see now should be following graphs

The admonitory written language that red line casing rises is used in noting a plan, click " Deploy " the link can be played piece " Deploy Supporting Filos To Testing Server " dialog box, click the icon of the folder that browse in following graphs

One is built in shooting the dialog box that give " Bin " folder, doubleclick enter this folder to be clicked next " save " pushbutton, return former dialog box at this moment, if pursue

Can click now " Deploy " pushbutton, the meeting after finishing plays a draw a frame round of information laying a plan

With going out to drill to will be in your site follows one is built on catalog " Bin " catalog, and one is copied inside catalog " DreamweaverCtrls.dll " file, this should be Macromedia him company accuse, little he your Aspx file with what MX does can not move, before place face expatiation the measure that establishs this file.

6. Build Datebase (data pool)

Open the Datebase option below Application, click plus pushbutton to choose the 2nd " SQL Server Connection " ;

The MX in playing the SQL that go out to link a dialog box can write good data source to link the pattern plate of string for you beforehand, you need to be revised according to your database information only, compared with UltraDev more human nature was changed some. Right is clicked after finishing " TEST " pushbutton checks, following graphs state the test is passed;

7. Build record volume

Open the Bindings option below Application, click plus pushbutton to choose the first " DateSet " build volume of a record, following plan institute are shown, ASP is built to record collect to do not have too big distinction below the pattern that establishs NET to record part and environment of former preexistence UltraDev, still be standard UltraDev interface, do not spend authority or can discover from inside the graph two point are different.

MX bore Chinese field name and Chinese watch name, this can improve our development efficiency greatly, also be one of progress that I think MX is the biggest;

much " On Failure, go To " option, that is to say you are OK and custom-built the page that changes current page to other to had been defined when the database builds failure, is not former the person that let browse in that way sees " mistake of 500 in-house servers " .

8. Applied DataGrid accuses

Open " Insert " below the toolbar " Application " applied project, listed here some can use charge an already quick item, below environment of should corresponding UltraDev " Live " thing team. Click Zun Qi the 3rd " DataGrid " accuse

Playing go out " DataGrid " undertake installing in the dialog box

ID: "DataGrid " -- accuse to build remove an ID;

DateSet: "DateSet1 " -- it is the record volume that we just build;

Show: "10 " Records -- custom-built every page shows 10 records;

Navigation: "Numbered Links To Every Page " -- the link that demonstrates partial page on the page, it is similar " . . .1 2 3. . . " form, still can choose here " Links To Previous And Next Pages " will demonstrate link turning over a page, similar " <<<>> > " form;

Columns: MX is read beforehand take record part beforehand buy two fields, representing a kind is " Simple Date Field " common word segment display;

After the setting is finished, you can click pushbutton to return, finished data to show so, open a browser to look. If not be too impatient so do accordingly next, increase a link that deletes a record.

Click " Columns " the plus pushbutton of right, choose the 5th " Delete Button " delete pushbutton, in the setting in the dialog box

Title: "Delete " -- the caption of indication row;

Button Type: "Link Button " -- show in order to link a form, you also can choose with " Push Button " pushbutton form shows;

Delete From: "Dbo. Jest is expressed " -- the watch that the need in choosing a database deletes

Primary Key: "Serial number " -- main key word

Submit As: "Int " -- the attribute that is serial number field, here is numeric type

After finishing " OK " return, you can discover " Columns " inside the country many group " delete " field, click again " OK " return a page.

Can show in the page right now join " DataGrid " accuse, this falls with UltraDev environment can be very different, you cannot choose among them some, can choose completely only, you can edit that is to say only " DataGrid " accuse an addition that will realize certain function. First without giving thought to these, save file to disk see final result

9. Show final result

Oh, the result is right still! Indication data, delete link, link turning over a page to have, such page is done below UltraDev with ASP can want many time on cost, and such link turning over a page wants manual adapting code about a hundred, did not think of to simple a few paces need to operate only below NET just, look use MX to edit ASP.NET or be worth to try, maybe still has more wonderful functions to waiting for you!

If you use MX to there was what result, experience not to forget to come in development trends respect,my forum communicates!

Digital biscuit (page of Http://www.dw-mx.com/) accredit cruel (Http://www.kupage.com) is reprinted

No comments:

Post a Comment