Saturday, October 10, 2009

Oneself start work menu of the activity that make

The friend that has talked about a day with QQ conceals window function automatically to it to fondle admiringly, it can make the window appears relaxed and neat and rich move feeling, a few friends of the author want to be joined in the webpage in oneself similar east, through fumbling discovery is used jointly Dreamweaer can achieve this kind of result, we adopt an activity bill of fare below make look.

The 1st pace: Appearance of the menu that make

A file is built in Dreamweaer, scale a layer, in a form should be inserted in the layer (if pursue 1) , undertake got-up to this form, join what dish individual event builds each to exceed a link next, exceed the underline of the link for take out, can edit the CSS style that exceeds a link, CSS selector is passed in CSS style face plate will " Link " and " Hover " " Decoration (adornment) " all install for " None (without) " , will " Hover " " Color (color) " the setting is red, good the setting finally style uses each bill of fare in (can press " F12 " key previews the effect) .


 

Graph 1



  The 2nd pace: Design the dynamic effect of menu

1, level of make choice of, become when the mouse " 10 " Zun Jian is pressed when the glyph pull the level use page top right corner (make whole menu show completely but above predestined relationship as it happens draws close the border on the page) , time line face plate is opened in window menu, level of make choice of pulls his move time line to go up, dreamweaer can produce a length automatically to be the animation object of 15 frame, pull the last crucial frame that touchs this animation object to arrive the 30th frame, its length setting is 30 frame. Click right key in place of the 15th frame next, choose in playing the quick menu that go out " add crucial frame " option inserts a crucial frame, pull the level use proper position (if pursue 2) .

Graph 2
The place of the 15th frame in time line window clicks right key again, choose in playing the quick menu that go out " add a movement " , add an alternant behavior for this frame, dreamweaer will open behavior face plate automatically. In clicking behavior face plate " + " pushbutton, choose from inside playing the menu that go out " Timeline/Stop Timeline " , open " Stop Timeline " dialog box, choice " Timeline1 " hind click " affirmatory " pushbutton shuts this dialog box. The incident of alternant behavior is " OnFrame15 " , the movement is " Stop Timeline " , when such lines between at that time run the 15th frame, animation will stop to broadcast, realized menu so resilient function.

2, also add in the place of the 30th frame of time line with same method " Stop Timeline " alternant behavior, realized menu to play the function that give so. After adding these two alternant behavior, diamonds of a blue appeared above the corresponding frame in time line wi ndow, it represents an alternant action. Choice " be broadcasted automatically and circulate " answer choose casing, make animation can be broadcasted automatically circularly (if pursue 3) .
Graph 3


3, after installing a behavior to let time line stop even now, can continue to broadcast. My tentative idea is such: Menu falls in general position resilient but withhold lower part only " campus grand sight " model of written characters, and menu play again go out and resilient whether to pass menu by the mouse those who go up " campus grand sight " will control. So OK such proceed: Menu of make choice of medium " campus grand sight " (should ensure of this model of written characters exceed link address to be " # " , link for nothing namely) model of written characters, in clicking behavior face plate " + " pushbutton, choose in playing the menu that go out " Timeline/Play Timeline " , choose in shooting the dialog box that give then " Timeline1 " hind click affirmatory pushbutton, at this moment lieutenant general of behavior face plate increases an action, in its " Events " next choices in drawing list " OnMouseOver " incident, animation is broadca sted when expressing to be in upper part of this model of written characters when the mouse (if pursue 4) .
Graph 4   so far, an activity menu make finished. Can press " F12 " key previews its effect.

But this menu what still have a bit a blemish in an otherwise perfect thing is, its disappear menu must be passed in the mouse the location of lower part (it is in this exemple " campus grand sight " model of written characters) when just go, want to be in menu play after going out, want a mouse only from this menu on removed can make menu disappears, the likelihood is about Fireworks of have the aid of or Flash, if you have what good method, might as well incoming letter and we communicate together.


 

16 DW use fast ability method

 1, use a type neatly

The netizen that familiar webpage designs knows, the method that calls Style is very much, we can click mouse right key to choose Custon Style to call Style level, right key also can be clicked to call Style on the elemental list in condition column. Although different method is achieved the effect looks like be like, but the HTML code that generates actually differs completely. Call Style level for instance with Custon Style, generate in webpage code < Span > label, such label more than 1 can make file very overstaffed and the analytic rate that affects a browser, so we should use the elemental list in condition column to call Style as far as possible.

2, command with Format Table alive

In complex webpage design, the application of form is most, the specific place that because use form to be able to dominate text and picture freely,appears on the webpage, make whole webpage looks thereby compact and unified. Dreamweaver also unwillings to lag behind in this respect, we can be used among them " Format Table " (the format turns table) the command comes the form that apace has designed beforehand to form application. Want to use the type that has devised beforehand, first the random cursor park form inside an unit case, reelection choose " Command " → " Format Table " command, in the dialog box that appears subsequently, from inside left list the choice devises plan. By " Apply " key will examine the effect, if dissatisfactory word, still can be installed afresh or revise the cost of partial parameter, be like attrib border degree of finish, setting color is waited a moment.

3, at the same time catenary receives two webpages

We know super link can connect a page only. If we want to open documentation in different frame page, can use " Go To URL " JavaScript behavior. Open a webpage that has frame, choose character or picture, choose from inside behavior face plate next " Go To URL " . We can notice Dreamweaver can be in " Go To URL " all practicable frame shows in the dialog box. After a framework that we consider to link inputs corresponding URL, the choice chooses another frame again among them and input another URL.

4, do not have Chinese name to the file

Everybody is in after making a webpage, connect regular meeting to remove have representative Chinese name to the webpage, will can make the person looks file name to be able to understand the content that file place contains probably, 2 will can go to the lavatory the photograph intermodulation between each super links is used. But if you are in such doing in Dreamweaver, can discovering Dreamweaver supports Chinese file name is not too good, happen via often can the page calls incorrect phenomenon, the webpage is saved in Dreamweaver after us so when, use English as far as possible or the number regards a file as the name, can avoid so above make mistake phenomenon.

5, resolution of clever setting font

We are in the webpage that make when, often have this kind of experience, the webpage that has made namely then is very normal when be browsed on this locality computer, but discover when be browsed on a computer originally beautiful webpage becomes askew, is this why? So the resolution of each computers should make your homepage falls to be able to show normally in different resolution, better settlement got in Dreamweaver. In documentation window right next horn, dreamweaver shows the resolution size that current documentation is become by the design. Click which number, the page that can feel current in playing menu giving form appoints indication resolution, can make through revising your homepage provides flexibility more. Make differ the monitor of resolution can better land shows.

6, clever conceal label

When if be in the webpage,inserting sightless element, dreamweaver can add automatically on the page to it corresponding elemental label, in order to facilitate we choose sightless element. But this is not a favour completely, for instance we have the group in very multilayer page to insert a form in, arranged too much layer element label as a result of first with respect to meeting discovery and make form automatic fall back on the 2nd of the page, although do not affect the result when browse, but this is met really block up our job. Feel when us label of a certain element is hinderous so when, simply will screen is dropped. The method is to press Ctrl+U to open Preferences face plate, in Invisibel Elements of the pitch on in Category, will appear in the right of face plate all elemental label. Want to drop the scratch out before the elemental label that does not need only, it is met with respect to guarantee against after reappear.

7, be apt to is used procrastinate put skill

When we are using Dreamweaver to edit a webpage, often need to insert a few image of what, the image that should insert suppose is very much, will operate according to groovy method appear very troublesome. We can be used procrastinate put skill to solve this problem well. Above all we turn the operation window of Dreamweaver into mobile window, will in order to vacate a space show Explorer window, after finding the image document that should insert, pull them with the mouse one by one the proper position that uses a webpage, dreamweaver will be automatic in the HTML code that adds the Url of these image to the file, of course the file that the image file that here asks to be procrastinated to move must be the Web image format such as Gif, Jpg. To been in the image in the webpage also is same, procrastinate directly it is OK to come over. But there is super link on the image that if be pulled,uses, cannot procrastinate with reuse use a technology, what because procrastinat e in those days,come over is super link address merely.

8, automatic setting updates time

We know a webpage wants to obtain more turning round that lead, one very important should be updated ceaselessly namely. But to us for these individual webpages, should be afraid newlier in time every day is not very easy thing. Accordingly, we hope the webpage can be updated automatically, the author offers a source code that can update modification time automatically below, we should add this paragraph of source code only...</ the goal that replaces time can achieve between BODY> :
<Script Language="JavaScript "></ Style> ; 2 it is to use a mouse ordinal the Text/Custom Style/Edit/Style Sheet/New/Redefine HTML Tag in clicking Dreamweaver, choose A from which, it is next in Decoration pitch on None, click finally succeeded certainly.

12, clever and duplicate character

The character duplicates each other among the applied process that differs in a few, it is the thing that we want possibly in real work to often be done. But, when if we duplicate from inside Dreamweaver,editing the character in the area to use a program to another, HTML code and character will be duplicated to go together, so we this how does ability duplicate the character in editing an area only come down? We know, when duplicating normally, be operated with shortcut key Ctrl - C, if we press key of a C more when duplicate, so Dreamweaver will be met only the character of duplicate pitch on.
   13, be apt to uses shortcut key

To improve the efficiency of the operation, we can use shortcut key in Dreamweaver, use Ctrl-B or Ctrl-I to be literal application boldface or inclined constitution type for example, the text that also can make shortcut key of below in order to a few clavier will be pitch on uses HTML form: Ctrl-0: Without Ctrl-T of format     : Ctrl-1 of paragraph     : Ctrl-2 of   of caption 1: Caption 2 Ctrl-3: Ctrl-4 of   of   of caption 3: Ctrl-5 of   of   of caption 4: Ctrl-6 of   of   of caption 5: Caption 6

  14, shut a webpage automatically

If we hope our webpage can be shut automatically inside designation time, might as well following code join at the back of the label in webpage source code: <Script LANGUAGE="JavaScript "></ Script>
Among them in code 3000 express 3 seconds, it is an unit with millisecond.

   15, name of clever setting object

When we are using Dreamweaver to make very mixed effect, possible need often uses certain repeatedly or many objects, for example we often need fixed position a certain specific form, image, if if we do not have certain webpage,medium many objects name, so in repeat when using these targets, the likelihood is very troublesome make mistake easily perhaps. Call these boy or gi rl friends to can go to the lavatory, we should establish a new target in every when, remember taking to have the name of representative and easier memory to it. When naming to these objects, we can pass a boy or girl friend " attribute " face plate will operate went.

   16, for image the link adds dynamic effect

Sometimes we achieve a kind of clear result to want, when hope mouse shift arrives on a certain link, can have use feeling generation. Use Dreamweaver can achieve this kind of result very easily. When the design, we need to prepare two image above all, the first is primitive image, the 2nd is the image after mouse shift goes up. Click the first graph with the mouse then, the link in attribute face plate is filled in column on the document that wants a link, click the F8 on clavier to bolt next, click in playing the Behaviors window that give " + " date, choose subsequently " Swap Image " , the 2nd picture chooses in the window that appears then, click finally it is OK to decide.

Of slip menu make

Answer today friends ask, will slide to on my website one menu effect writes a simple tutorial; There is an effect that slides about the layer in ministry of software of bovine muscle university, be like the advertisement on Itnow also is such adoption effects, unused moment is concealed, pushbutton layer is clicked when using slowly slip come out, saved limited page space namely, still achieved the visual result of envy making a person, the feeling rises pretty good still. Everybody can click this effect here is looked carefully at.




Return to the subject, gibberish says less. Preparation works as follows:

1. A blank documentation is built in Dw (the page that perhaps opens you to want to add the effect) .

2. Set the Css style of good yourself.

3. The form that inserts a long 500pix on the page (here explains: The purpose that inserts form is to control a layer to hold relative position below different resolution chang eless, if relevant setting was not become before your page, so this one page structure that you may want to expend bit of kongfu to arrange you) .

4. Enter cursor place form inside, click menu [insert -- layer] insert to grow 500 tall the graph layer of 20, name for Layer1.

5. Enter cursor place graph layer Layer1 again next, click menu [insert -- layer] insert to grow again 500 tall the graph layer Layer2 of 130; Be apart from the left in the attribute of Layer2 and above be apart from install for 0, appoint the setting look that you like for it.

6. Repeat measure next the method of 5, insert Layer3 of layer of a graph again, the good with special that's all right of this graph layer, in this my tutorial, I just am to place a few pushbutton just. Finally my if pursue,rise:



TIPS: Here so the end that become is to want slip picture to you a fender is added before the layer, pursue when click only this graph layer from you issues an abi lity slowly slip come out.

Begin now, just in the making process of the slip menu that make one's bow should make today to us.



Let us repeat the measure above again now 5, insert Layer4 of layer of a graph again, attribute of setting graph layer is wide 500, 150 tall, just be a moment ago Layer2 is mixed the high the sum of Layer3, adjust graph layer Layer4 layer of additionally two graphs below. If pursue:



Next we click the eye before graph layer Layer2 to let him close, can let us see the graph layer Layer4 below it so.



At this moment, we click ALT + F9 to open time axis face plate, DW had added acquiescent time axis Timeline1 for us, next, we want our pitch on slip graph layer Layer4, above click right key, choice [add time axis] at this moment we can be in time axis face plate the graph layer Layer4 that sees we just are made, this explains, we had added a success!





Next we click time axi s to go up the 15th hardwood, in the attribute face plate graph layer Layer4 above be apart from adjust for 150. To here, a can slip graph layer considers do good, you can procrastinate move the gules diamonds above time axis slowly from 1 trend 15, this graph layer that you can see you slowly mix from Layer2 slide below Layer3 come out!





Good, the setting of graph layer Layer4 that we need to be able to slide to this only now can activation his movement calculates Over: ) before this, I had inserted a form on the Layer3 that I add, installed two pushbutton for Layer4.

 



We install activation first the movement of slip graph layer. This pushbutton spreads out on the choice, turn to behavior face plate, click choose in the menu that come out [time axis -- broadcast time axis] DW can bomb a put oneself in another's position of a window, timeline1 of next above the choice in pulling menu.



Affirm in behavior face plate incident is Onclick next



Good, to here, you can be previewed, click when you on when spreading out pushbutton, your graph layer is met slowly from go up and next sliding come out!



How, saw: ) we add on one to close an act simply to graph layer again, click layer of the graph after shutting pushbutton to conceal namely. Pushbutton is shut on the choice, turn to behavior face plate, click choose in the menu that come out [show conceal layer] , the Layer4 on choose is chosen in the window body that jumps out, click next below conceal pushbutton, its the setting is conceal, if pursue:





Good, preview again, after discovery spreads out, click shut graph layer to do not have: ) nevertheless, have a problem it seems that, click again when spreading out, it seems that it doesn't matter reacted, that is we still have a movement to do not have a setting.

Repeat a moment ago measure 5, pushbutton spreads out on the choice, add a movement [time axis -- turn to time axial hardwood] , the window body that jumping out falls mediumly pull menu to choose Timeline1, hardwood number is put on 1.



Good, preview this discover this problem is solved. But we still are oversight it seems that a problem, click layer of this graph after shutting to was to conceal by the setting, click again spread out to also do not have reaction. Still use old method, give spread out pushbutton to add a movement to be able to be solved!



Repeat measure 5, choice [show conceal a layer] , and a moment ago measure 6 contr ary, this we choose to show, after deciding, assure to show the time that locks graph layer is Onclick in behavior face plate. If the behavior face plate that spreads out pushbutton at the moment pursues:



Good, preview again, everything is normal!

So far, this effect calculates finished, of course, everybody is completely OK ego play makes better result, but remain essentially the same despite all apparent changes, want us to had mastered what time axis coordinates behavioral action to apply only, all effects just handle an issue: )

Date is joined inside the page with JavaScript

A lot of netizens should be met when the webpage that browse the function that discovers a lot of webpages have indication time and date, this is not difficult, use visible webpage to make software Dreameaver can insert time and date directly. But we use JavaScript to realize this function today, can rise to know the effect of JavaScript of network programming language at the same time, this example principle adopts JavaScript program namely carry out the date that makes individual client carries a machine and time to show on the webpage.

Its source program is as follows:



In this exemple, we are indispensible build variable of a date above all, this can be finished by Today= New Date() . If do not have special if appointing time and date, the browser will use this locality client to carry the time of the machine. If put it into variable Today, what the attention wants here is, we do not have declare Today of this variable model voice.

Outside dividing above function, you are OK also when building date thing beforehand set date is as follows:
DocStarted= New Date(96, 0, 13)

It is above all year, it is a month then (but remember decreasing 1) , it is day then again. Same method als o can impose the set of time. Following DocStarted = New Date(96, 0, 13, 10, 50, before 0) 3 are date year, month, day, it is then when, cent, second.

Finally, we must remind you JavaScript does not have effective date condition, but it however can ground of without striking a blowing shows date and time, the reason is it it is from   of 1 / 1/ 1970 0 0h begins to be calculated with Ms(milli Seconds) of current time, this sounds it seems that some are complex. But you need not worry, what it has a level is common function can be calculated, it you should know how to be used only is OK that you should know how to be used only.

Mobile character result achieves in condition column

When everybody browses a website, the literal one after another of mobile condition column from left appear right, the eye that lets you has too many visitors or business to deal with, you also want to make your webpage is having same effect, we achieve this result now through the application of JavaScript program, we come to anatomize below this kind of dynamic effect is how arise.

The train of thought that achieves this kind of result is: Endow with the character that should present to a variable first, install a function, every other plays a character on condition column for some time, the character increases by degrees appear, when literal length is equal to the length of whole word, make its are 0, play a character afresh, ceaseless loop can get this kind of result.

Below, we will have a look at source program.
<script Language="JavaScript ">Var Msg = " welcomes to 5D multimedia! ! ";
/ / Msg variable is the character that set condition column should appear (a word)Var Interval = 120
/ / length of character of how many millisecond increases set interval, it is 120 millisecond hereVar Seq=0;
/ / the literal length that represents trendsFunction Scroll() {Len = Msg.length;Window.status = Msg.substring(0, seq+1);
/ / literal character is added oneSeq++;
/ / the length of dynamic character is added oneIf (Seq >= Len) {Seq = 0;Window.status = '';Window.setTimeout("Scroll();" , interval);
}
/ / if dynamic character length and whole word are same, the length of dynamic character is set for 0, had come afreshElseWindow.setTimeout("Scroll();" , interval);
}
Scroll();
</script>

The effect that can have afore-mentioned source code beat as follows into the <body></body> label of Html file:


MXP plug-in unit is used to insert VRML work in DW

Introductive: Well-known, the VRML work that we make needs to insert designation webpage sometimes in. Below the browse case that did not assign, we can be with EMBED in HTML cite through editing source code to be linked directly by hand VRML file. Nevertheless we know, at present the professional browser as a result of neither one forestall, and each technology develops the arrangement of the company differ, often can bring about same a work, what browse the effect in different browser is different. This current situation decided sometimes what we must appoint a browser to achieve creation result is optimal show, after the Mxp format plug-in unit of the Macromedia Dreamweaver that had the Vrmlsuite115 that foreign friend develops technically, we can be in very convenient and efficiently the specific place of the webpage inserts VRML work.

OK! The use flow guideline that we begin below.

Resource downloads: Http://www.neeneenee.de/vrml/

Domestic natural resources links: Http://www.5dmedia.com/users/xuhuairuogu/vrmlsuite.zip

Use requirement: How to already contain Macromedia Extension Manager.

After clicking the Mxp file that installs Vrmlsuite115, in Macromedia Extension Manager we can see the file information that be as follows.




Such word, after we enter Macromedia Dreamweaver, in the face plate that floating sees as follows place is shown on the VRML on quick face plate.



The VRML in the graph listed in quick face plate the VRML browser icon of a few common famous, we can choose what to want to appoint the VRML browser that move through clicking.

The VRML work that the VRML browser that lets us see Blaxxun company first supports uses a case. Above all, view the first option that we should install, pursue as follows, from had listed the version of Blaxxun browser: Want to appoint a version in Blaxxun5.1 from Blaxxun 4.4, Blaxxun5.0, usually, it is taller of course better, right not ^_^ .


There are 3 kinds of options in Tag label: Object(object) And Embed (built-in) , Embed Only and Object Only. Acquiescent setting is Object And Embed.

Name/ID: CC3D (do not change this, the ID identity that CC3D is plug-in unit of browser of Blaxxun company VRML marks)

Width (width) , Height(height) the setting of two option need not be told.

File (file) in option, can fill in directly the URL resource of the link, also can click Browse to browse pushbutton, undertake choosing to decide in shooting the dialog box that give, the key should notice a method problem when browsing went.



Background-color(setting color) setting: Inside this colored selector, use rise very convenient, also did not tell.

The option setting below is respectively: Dashboard (appearance is pulled) , Force RGB (it is RGB color compulsively) , Preload Resource (to load resource) , Hide Cursor (conceal cursor) , Background Transparency (setting is transparent, internet Explorer Only applies to IE browser) only.

The VRML work that the VRML browser of Cortona company suppo rts uses a case, the comparison with Blaxxun, much a few settings, following plan institute show:



Mask (cheat ply) , Skin (the skin) , Navigation (navigation mode) , Navigation Speed (navigation speed) , Show Splash (slosh of indication Pi Li) , Menu (menu) , 3D-border (3D border shows) , Wait For All Resources.
It is Cosmo browser, Piveron browser, VRML97-object respectively next (what when VRML work is browsed, the choice uses a browser) , WorldView browser uses a setting, use because of the setting about the same, so...







DW-MX makes ASP.NET- link and complement

Use link shows detailed page

In should link in the use process of UltraDev before showing detailed data page is general is to pass " Go To Detail Page " server behavior, and this action was not provided however in window of behavior of the server below NET environment, so how should be the link done? The answer still accuses in DataGrid in the setting.

Explain to go to the lavatory, we also put the element of detail page in Default.aspx page.

Build volume of a record first " DataSet2 " use those who show detailed information, establish a method very simple, if the graph is a setting only,serial number is delivered for URL come over " Xid " parameter.





A form is inserted in the page, will " DataSet2 " the field that records concentration is ordinal bind decide proper place, still have did not forget setting of behavior of Show If DateSet Is Not Empty of → of Show Region of → of use Server Behaviors is become " DataSet2 " record volume is empty when conceal form, pursue as follows.



After finishing, we should edit DataGrid to accuse again, in the dialog box setting serial number is deliver " Xid " the link of parameter, in " Columns " choose inside the country " serial number " , click lower part next " Change Column Type " pushbutton of changeover kind kind chooses " Hyperlink " exceed a link



Playing go out " Hyperlink Culumn " following settings in the dialog box

Title: "Serial number " -- the caption of indication row

Hyperlink Text: -- transcend link written language, here includes to have 3 projects

Static Text: -- you can write a character to ser ve as a link here

Data Field: "Serial number " -- the field that you can choose to record concentration will serve as a link

Format String: -- the indication format that you can define a field

Linked Page: -- the page that links, here also has 3 projects

Static URL: -- the page that links a static state

Date Field: "Serial number " -- here is to point to a choice " serial number " the field is worth as the parameter that delivers next pages
Format String: "Default.aspx? Xid={0} " -- the page that the pushbutton of use right chooses to want to be linked, our detail record also chooses in this page " Default.aspx " can make the string in front, needing the parameter name that notices is to be generated automatically is Chinese " serial number " character, we are being built " DataSet2 " parameter name is appointed to be when recording part " Xid " , so here wants to be revised by hand.

The graph is as follows after finishing




Click " OK " return save file to disk check.



   A few complement of other

1. Accuse in DataGrid in we had used 4 kinds of indication types, knew their use method basically also, still remaining a kind is " Free Form " . This is a kind of freer indication type, you can be joined here amalgamative a few trends are recorded or amid adds text version, also can be expression accuses, anyhow this is a when offer quick indication step.

2. Everybody still should be written down so that we are editing " Hyperlink Culumn " exceed link dialog box from time to tome " Format String " project setting is empty, how should be if need again,installed again? Browsed we make ASP.NET documentation as follows try, string is joined inside this casing " { 0:X} " , pursue as follows



After saving file to disk, in the browser we can see next pictures



"Serial number " the field indicates numerical value with hexadecimal format, the reason is in format character " X " go up, specification of character of a few formats is below

C indicates numerical value with monetary format.
D indicates numerical value with decimal format.
E with scientific notation (index) the format indicates numerical value.
F indicates numerical value with securing a format.
G indicates numerical value with groovy format.
N indicates numerical value with digital format.
X indicates numerical value with hexadecimal format.

3. If need " serial number " the link of the field is opened in order to build window form, that this how? This DataGrid accuses in did not provide this function it seems that, we try to change change a source. Turn to source window, find correspondence " serial number " the code of the field:

DataNavigateUrlField=" serial number "
DataNavigateUrlFormatString="default.aspx? Xid={0} "
DataTextField=" serial number "
Visible= "True "
"/ of HeaderText=" serial number>

Add finally in code " Target="_new" " string, make become

DataNavigateUrlField=" serial number "
DataNavigateUrlFormatString="default.aspx? Xid={0} "
DataTextField=" serial number "
Visible="True "
HeaderText=" serial number "
Target="_new" />

Good, such OK, the link that clicks serial number to go up again when you is recorded even if appeared with type of new window degree of lip-rounding.

The DataGrid below environment of the ASP.NET in Dreamweaver MX controls a fundamental use with respect to these, of course you can use modification code to obtain more function, still be adage, dreamweaver MX can provide efficiency when you develop ASP.NET, and what what have a function at present is very insufficient still, watch source, understanding source or the key that use good Dreamweaver MX more so.

 

 

With Dreamweaver MX the navigation that make falls pull menu

Dreamweaver from since going out, its are handy use easily and the function is powerful " behavior " (Behavior) is one of heat that everybody pays close attention to all the time. In Dreamweaver MX(DW MX) , had again to this one function augment and improve.

In DW MX, what behavior points to is to answer some incident (Event) and an adopted operation (Action) . Among them the incident that what Event points to is a browser, window refresh, mouse is for instance mobile wait. And what Action points to is the JavaScript code that tiring-room answers incident, can complete corresponding operation, broadcast voice for instance, retroflexion the picture.

With DW MX the navigation that make falls pulling menu is one of specially good effect that often use in the webpage. (In if graph 1) is main,applying DW MX " Show-Hide Layers " behavior.

Graph 1

Make good navigation above all (graph 1 medium " product center " ) of that one column, add a layer subsequently, regard next pulling as the position that menu will indicate, write the corresponding column of menu.


Next, open " Behaviors " face plate, at the same time pitch on " product center " link (attention, this moment cannot the layer that enough pitch on just has built, cannot apply otherwise " Show-Hide Layers " behavior) , click " + " date, choose " Show-Hide Layers " , the layer that can see we just had been built is in options, can set perhaps shows to conceal (the 2) that be like a graph.



Graph 2

The magical function of behavior basically reflects in: If we want real at present to pull menu, the key lets a mouse move namely " product center " on the link when, make the layer shows; And when the mouse leaves a link, make the layer is concealed. According to this kind of thought, we establish two Action for this layer above all, one chooses Hide, one chooses Show. Next, adjust Event, set the Event of Hide Layer for OnMouseOut, leave a link for the mouse namely; And set the Event of Show Layer for OnMouseOver, it is link of mouse pitch on namely. By " F12 " preview, with respect to the effect that can see we are expected.

Such, it is OK that menu is pulled below the navigation that we feel very mysterious at ordinary times come true in behavior easily. Still can continue to apply on navigation link " Swap Image " behavior, the picture appears to retroflexion when implementation rat punctuation chooses a link the effect.

Behavior is not each isolated specially good effect, can combine overlay to realize complex function by many behavior, outside the action that besides DW MX acquiesce has set, we still can go up from Www.mcromedia.com download is more more the tripartite behavior of cruel, we need to duplicate them to fall to DreamweaverMX\Configuration\Behaviors\Actions\ catalog directly only can, make this one glitter of DW MX is nodded thereby more blindfold.

DW-MX makes ASP.NET- revise

Respecting is answered to use Dreamweaver MX to build ASP.NET to develop an environment on, and be in can inspect completely did below the environment data shows and delete the function such as the record.

From the point of the means of implementation, all operations entered DataGrid to accuse in, netizen come to an agreement or understanding is compared is a large plug-in unit, I feel also is pretty figure, of course common plug-in unit can not get the function that it has, continue to say this accuses again below when indication data perhaps says operand is occupied a few in category.

Add modification caption function

DataGrid itself had the function of modification record, need to be installed in the dialog box only.

We are opened below Dreamweaver MX page of previous editorial Default.aspx, turn to the Server Behaviors window below Application, doubleclick " DataGrid(DataGrid1) " accuse (should be called server behavior to just be opposite in MX actually, ah, same cough up) , click " Columns " the plus pushbutton of right, choose the 4th " Edit, update, cancel Buttons " editor pushbutton, the name is a little long, nevertheless it had these functions really.



Playing the setting in the dialog box that give

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;

Update Table: "Dbo. Jest is expressed " -- the watch that the need in choosing a database revises

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, fasten rapid move to shut first accuse a dialog box, you still need to set the field that should revise.

Doubleclick Columns inside the country " caption " one column, accusing the dialog box lieutenant general that give " Read Only " choose diamonds setting to be do not choose, below " Submit As " should choose you to be in the database only the data type of caption correspondence can, it is here " NVarChar " type.


After finishing " OK " return, can decide DataGrid accuses a dialog box now. Good, save file to disk check this modification function.

In the browser now should be the about of next graphs



Click correspondence " Edit " the character of caption column can be replaced with text casing, after then you can alter the written language in text casing, click " Update " , see a result how:



Incorrect, the character is obviously in text casing, how to become " ? ? ? " !

According to netizen Xpilot remind, discover this is the problem on encode. Browsed the documentation of a few ASP.NET, discovery can use ResponseEncoding attribute to request ASP.NET to use UTF-8 encode to send a webpage.

Http://chs.gotdotnet.com/quickstart/aspplus/doc/cultureencoding.aspx

In the group of Default.aspx source window, we a ResponseEncoding="gb2312" is medium " Gb2312 " repair instead " UTF-8 "



Save file to disk to check again next. Following plan institute are shown, modification record succeeded.

 

How does Dreamweaver make float ad

Roam between the network, you can detect, internet not only the ocean that is information, also be advertising ocean. Besides common Gif Banner, Flash, float advertisement also is one of relatively popular advertisement forms on nowadays net. Pull the roll that uses a browser when you when, this kind of ad that uses in page rise, can follow screen moves together. Although this kind of effect is revealed to advertisement,have the economic value that comparative, but to browsing you the person of the webpage is told, this is hamper already read, affect the thing that reads interest again, accordingly scarcely can be abused. Nevertheless, if you can if be apt to is used, it can produce huge effect.

It is not difficult to should make result of float mood advertising, if you have JS base can oneself write, if write the word that is disinclined to write repeatedly, download tool of a specially good effect to the net, press clew stickup code with respect to OK. Nevertheless, how is wanting to understand it truly done, need to master knowledge of a few JS. Here introduces simple float advertisement way to everybody.

This paragraph of code can be put between <body></body> under, I joined meantime a few annotate (namely " / / " the character after and " < ! , " "- - > " the character between) .
<SCRIPT FOR=window EVENT=onload LANGUAGE="JScript">After InitAd();// is record in a page, call function InitAd()
</SCRIPT>
<script Language="JScript">
< ! - -Function InitAd() {After Document.all.AdLayer.style.posTop = -200;// installs OnLoad incident to arouse, advertisement layer is opposite at securing the Y direction position afterLayer of setting of Document.all.AdLayer.style.visibility = 'visible'// is visible
MoveLayer('AdLayer');// calls function MoveLayer()
}Function MoveLayer(layerName) {Layer of advertisement of float of Var X = 600;// secures the X direction position at the browserLayer of advertisement of float of Var Y = 300;// secures the Y direction position at the browserVar Diff = ( document.body.scrollTop + Y - Document.all.AdLayer.style.posTop)*.40;Var Y = Document.body.scrollTop + Y - Diff;Eval("document.all. Eval("document.all.. + LayerName + ".style.posTop = Y");Eval("document.all. Eval("document.all.. + layer of mobile advertisement of LayerName + ".style.posLeft = X");//SetTimeout("MoveLayer('AdLayer');" , 20);// setting calls function MoveLayer(again after 20 millisecond)
}
/ /- - >
</script>
< ! - - below the layer that is AdLayer for an ID (the name that be like ID is not AdLayer, the AdLayer inside MoveLayer() also wants to be revised accordingly above) , include a piece of picture that takes a link- - >
<div Id=AdLayer Style='position:aBsolute; Width:61px; Height:59px; Z-index:20; Visibility:hIdden;; Left: 600px; Top: 300px'>
<a Href="http://www.5dmedia.com/bbs"><img Src=' . . / Qqkk2000.gif' Border="0" Height="60" Width="60"></a>
</div>

Here, the value that you can set X, Y comes the position that set place secures a layer, change SetTimeout("MoveLayer('AdLayer');" , the of 20 value in 20) hopes to call the time-interval of MoveLayer() for you. Still having those who want an attention is, use picture had better be the Gif graph of transparent setting, obscure in order to make the setting color of the picture unapt from the back content.

Be sure to keep in mind, want careful with float type advertisement, while the consideration uses specially good effect, ten million should consider the sense of the person that browse, cannot be abused!

The data that uses DW alive guides, sort and beautification

When having, we often need to so that contact,release a few data such as client information to the net, but as client data increasing, is be being updated on your net to also feel more and more ability not equal to one's ambition? How should this do? Actually, besides will come true with these tiring-room languages such as Asp, Php quick outside updating, dreamweaver itself offerred data to guide the method with sort, this is absolutely to knowing the friend of tiring-room greatly good news. Dw also from version 3 retained this function all the time to newest Mx, see its economic point. We come to experience below its effect after all how.

Note: The article is with Dreameaver MX exemple

1, for example we at hand has a Kehu.txt file now, sheet of connection of ** firm client is inside, detailed information is shown as follows:

Full name, sexual distinction, position, phone

Li Ming, male, personnel of A company technology, 87185900

Li Yan, male, b company director, 80226888

Wang Jiang, male, c company chief engineer, 83546790

Su Lin, female, personnel of D company sale, 87556341

Chen Dongdong, male, director of E company project, 87436588

Can see, inside this every undertook depart with comma.

2, (1) open DW MX, build page of a Html, insert/table Objects/import Tabular Data of choice menu column this.

Graph 1

(2) window of occurrence Import Tabular Data, click " Browse... " pushbutton, the choice deposits the text file of data, in Delimiter this in want and the separator in text file is opposite should, because be used in Kehu.txt file, is comma, chose Comma so, other can need each to undertake choosing to revise according to everybody.

Graph 2

(3) click finally " OK " , a piece of form that includes text file data appears was in your before.

Graph 3

3, (1) although form is,be done, nevertheless sometimes we need to have a sort to the data in form, this bit of DW also thought of of course, first pitch on form, choose menu column Commands/sort Table next this.

Graph 4

(2) window of occurrence Sort Table, sort By choose Column 1, order the choice is mixed by alphabetical sort Alphabetically ascend arrange Ascending, other each everybody can consult graph 5 basises need to undertake choosing.

Graph 5
(3) click " OK " , the sort of 1 is listed in completing pair of form so, list 1 medium full name to all undertook with phonetic alphabet size ascend arrange.


Graph 6

4, (1) now, our effect and sort came out, what should do finally is the beautification to form, love beautiful heart person to all have, form is not exceptional also, move beautification besides him hand outside, DW offerred seventeen kinds of style technically also to choose for you. As similar as Sort Table, first pitch on form, reelection choose Commands/format Table.

Graph 7

(2) window of occurrence Format Table, top left corner has all kinds of type, can choose according to your be fond of, because the others is the operation of goofy type each, did not introduce one by one here, just emphasize to last, this are to enquire whether you add code of all kinds of type to acquiesce of the and rather than in TD mark to be added in TR mark, here the author suggests you are not ticked off anthology, can generate otherwise get much code more than acquiescent setting.

Graph 8

(3) click " OK " , success, the effect that creates finally pursues as follows, how? Simple a few paces can make it such, need the function that comes true with ability of tiring-room process designing originally, do easily with DW decided, its powerful point a lso depends on this just about.

Take the bitmap form application in DW MX

"Take bitmap look " just as its name implies is to be in what before preparing will final figure to add Web page, use temporarily graph. Use it to be able to be below the circumstance that does not have good figure page of the Web of go ahead of the rest that make -- the place that uses a figure in need inserts to take bitmap look first " occupational " move " domain " .
(One) insert take bitmap look

Will smooth demarcate inserts graphical place in need; Choice: Insert > image occupies an accord with to appear namely image takes an accord with dialog box, if pursue:

Set is good click after each parameter " affirmatory " in was about to occupy bitmap form to insert a page, if pursue:

Graph:

Name and volume showed above. Looked carefully at source code discovery to increase an image ticket that includes empty Src property.

(2) replace take bitmap look

1. After been design when the page, we use correct figure to be replaced with respect to need take bitmap look. Using DreamweaverMX (abbreviation DWMX) bitmap look is taken in be chosen and open attribute face plate, click " found " pushbutton. Criterion DWMX can start FireworksMX (abbreviation FWMX) had built automatically to mix take bitmap look the blank canvas of same size awaits graphical stylist " hold a knife to make " .

2. The figure that makes good place need in FWMX and after been optimize, click canvas above " finish " pushbutton.

Appearing " put additionally for " name of a file is taken to be saved next to the Png file that file in the dialog box (after such facilitating, revise) ; Playing subsequently go out " derive " after relevant set been make in the dialog box " save " this file.

3. Switch comes DWMX, our discovery occupied bitmap form to had been replaced. Look carefully at code, discovery inserted the address of Src already automatically, the size of the others, the parameter such as Alt all carries original state, if pursue:

Ah, be very convenient? From here we also can be experienced " 3 swordsman " cooperating is unapproachable really!

(3) need to notice

If be in FWMX scale heat up an area and added a link, FWMX will not delete the link that has added image to take an a surname in DWMX; But if be on the image in FWMX scale a section, will replacing the link in DWMX documentation is being deleted when taking bitmap look.

Make menu of right key of webpage exceeding cruel 2 laws

In general webpage, the menu of acquiesce right key of IE browser is invariable fixed mode, the to it utilization rate when major netizen browses a webpage is not high. To professional webpage stylist, if can devise right key menu personalized content, the style should be how cruel and convenient.   
Just think, the user is right on your website key, it is you of elaborate organization " link " , " post a letter " , included the animation of seesaw pattern Flash of profusion even! If pursue 1 -- fasten dribble, we satisfy a craving for delicious food with respect to solution below, look how to make: ) .

Of right key menu transform, I have two kinds of ways (actually, it is same constitutionally, it is the thing) of JavaScript.

The first kind of method is prior, what duplicate following source code to file of the HTML in the webpage is medium can.

   <Style>
  <! - -
.skin0 {
Position:aBsolute;
Text-align:lEft;
Width:200px;
Border:2Px Solid Black;
Background-color:mEnu;
Font-family:VErdana;
Line-height:20px;
Cursor:dEfault;
Visibility:hIdden;
}
.skin1 {
Cursor:dEfault;
Font:mEnutext;
Position:aBsolute;
Text-align:lEft;
Font-family: Arial, helvetica, sans-serif;
Font-size: 10pt;
Width:120px;
Background-color:mEnu;
Border:1Solid Buttonface;
Visibility:hIdden;
Border:2Outset Buttonhighlight;
}
.menuitems {
Padding-left:15px;
Padding-right:10px;
}
  - - >
  </ Style>

  <SCRIPT LAN GUAGE="JavaScript1.2">
  <! - - Web Site: Http://www.painting-effects.co.uk- - >

  <! - - This Script And Many More Are Available Free Online At- - >
  <! - - The JavaScript Source! ! Http://javascript.internet.com- - >

  <! - - Begin
Var Menuskin = "skin1"; // Skin0, or Skin1
Var Display_url = 0; // Show URLs In Status Bar?
Function Showmenuie5() {
Var Rightedge = Document.body.clientWidth-event.clientX;
Var Bottomedge = Document.body.clientHeight-event.clientY;
If (rightedge<Ie5menu.offsetWidth)
Ie5menu.style.left = Document.body.scrollLeft + Event.clientX -Ie5menu.offsetWidth;
Else
Ie5menu.style.left = Document.body.scrollLeft + Event.clientX;
If (bottomedge<Ie5menu.offsetHeight)
Ie5menu.style.top = Document.body.scrollTop + Event.clientY -Ie5menu.offsetHeight;
Else
Ie5menu.style.top = Document.body.scrollTop + Event.clientY;
Ie5menu.style.visibility = "visible";
Return False;
}
Function Hidemenuie5() {
Ie5menu.style.visibility = "hidden";
}
Function Highlightie5() {
If (event.srcElement.className=="Menuitems") {
Event.srcElement.style.backgroundColor = "highlight";
Event.srcElement.s tyle.color = "white";
If (display_url)
Window.status = Event.srcElement.url;
}
}
Function Lowlightie5() {
If (event.srcElement.className=="Menuitems") {
Event.srcElement.style.backgroundColor = "";
Event.srcElement.style.color = "black";
Window.status = "";
}
}
Function Jumptoie5() {
If (event.srcElement.className=="Menuitems") {
If (event.srcElement.getAttribute("target") ! = Null)
Window.open(event.srcElement.url, event.srcElement.getAttribute("target"));
Else
Window.location = Event.srcElement.url;
}
}
/ / End- - >
  </ Script>
  <Div Id="ie5menu" Class="skin0" OnMouseover="highlightie5() "OnClick="jumptoie5();"> of   of OnMouseout="lowlightie5()"  
  <Div Class="menuitems" Url="javascript:hIstory.back();"> is returned</ Div>
  <Div Class="menuitems" Url="http://javacool.3322.net"> answers home page</ Div>
  <Hr>
  <Netease of Div Class="menuitems" Url="http://www.163.com"></ Div>
  <Sohu of Div Class="menuitems" Url="http://www.sohu.com"></ Div>
  <Hr>
  <Sina of Div Class="menuitems" Url="http://www.sina.com.cn"></ Div>
  <Yahoo of Div Class="menuitems" Url="http://www.yahoo.com.cn"></ Div>
  </ Div>
  <Script Language="JavaScript1.2">
If (document.all &&Window.print) {
Ie5menu.className = Menuskin;
Document.oncontextmenu = Showmenuie5;
Document.body.onclick = Hidemenuie5;
}
  </ Script>
Its effect pursues as follows:

The 2nd kind of method is a plug-in unit that uses Dreamweaver -- Right_Click_Menu_Buil-der, can get in Http://www.macromedia.com download. After installation, can b e in of Dreamweaver " Command " of menu below find " Right Click Menu Builder " command.
Click this command, appeared one is like the setting casing that the graph shows 3 times. Basically have two parts content: "Menu " and " Styles " .

Menu installs a function, link of super link, post a letter is installed here, be here to be able to establish 10 link at most. In this choice casing " Menu Text " it is you the character that right key lieutenant general shows (change Chinese) ; In " URL " in write corresponding link way; "Target " whether is the decision new the window or it is the content that shows a link with present window, fill " Blank " show in new window namely, with Dreamweaver " Target " the setting is same.

Styles is appearance of responsible setting menu, have two kinds of choices: Img Src="http://tech.china.com/zh_cn/netschool/homepage/167718/20020521/images/
11257823_63732.jpg">
"Windows Type Menu(Default) " it is acquiescent -- most the appearance of guileless, familiar Windows style;   
"Custom Menu " decide meaning menu oneself, if you chose this one, undertake installing to the content below even:
"Menu Width " , the width of menu;
"Font " , font;
"Font Color " , font color;
"Font Side " , font size;
"Background Color " , " Background Image " , bear scenery and background picture;
Still have " Cursor " , use choice mouse type.
These set of above are good, can nod " Add " create the effect. Preview, pretty good?

How does that join Flash? Such doing: One is added in the webpage " Table " , its " W " wide proposal sets for: "100% " , such meetings are convenient the fixed position of all sorts of elements that add below you. Good, in this " Table " in the SWF file that inserts Flash, the position is set into " be placed in the middle " (basically be convenient fixed position, specific of course issue is specific analysis, oneself try the) with intentional meeting more.

Little skill: Flash animation mights as well make it has alternant link the sort of, why? Such super links that you can increase aleatoric amount. Plug-in unit oneself has most 10 limitation, used Flash to be able to be solved completely! ^_^

DreamweaverMX realizes website batch to update

In Dreamweaver 4.0, we already engaged the notion of pattern plate and library, know they are the good tool that batch makes the webpage with similar style. Be in nowadays under Dreamweaver MX(in abbreviation DW MX) , the function of pattern plate and library got be refininged further with strengthen, realize the characteristic that associated webpage updates automatically especially, make pattern plate shines what become DW MX greatly with the library color.
  
1, the application that pattern plate sees in light of us above all, what differ with Dreamweaver 4.0 is, DW MX extended the operation of pattern plate " Modify " with " Insert " below two menu. In the meantime, in " File " of option " Assert " child pattern plate also can be founded directly in option.

2, find " Assert " child option, to the left click in tool column " Templates " pushbutton, right now pattern plate is empty, we can be in right next horn are clicked " New Template " pushbutton, pattern plate of a blank can appear in face plate (the 1) that be like a graph, click pattern plate name, it is pattern plate is entered can compile position. Attention, right now pattern plate still does not have any accretion any elements, we can resemble editing common webpage to add form, image, character to wait on pattern plate euqally. After be being added, save pattern plate, can be in of acquiescent site folder " Templates " child the pattern plate that a moment ago had made is found below folder, patulous name is.dwt.



If disrelish such troubles, DW MX still provided a kind of directer means, after the editor should save the webpage that is pattern plate very much, in " File " menu midpoint is attacked " Save As Templates " , can make pattern plate.
3, after pattern plate is generated, build even can edit area, prepare to fill different webpage content in the future. Open pattern plate, click menu " Insert/Template Object/Editable Region " , appear can edit area dialog box, after designating area name, can see blue pane appears in pattern plate. The pattern plate that can edit an area was built after saving.

4, how does batch generate a webpage? Click menu " File/New " , choose " Templates " option, can see immediately build generated pattern plate, click " Create " pushbutton, pattern plate begins automatic apply mechanically to be on the webpage. We can see this time, pristine pattern plate area is yellow, among them element is already fixed, cannot edit, and we just appoint can editing area is blue, can edit. Come so, not only simplified greatly the workload that we create similar webpage, and the consistency that assured webpage style effectively.

5, finally, it is associated webpage batch is updat ed, this is an indispensable technology when large website updates a webpage, can come true easily in DW MX. Because of us all webpages apply mechanically identical pattern plate, and these webpages are saved to be in same catalog leaves a site, when the common element that wants all pair of webpages when us undertakes altering, the element in needing to revise pattern plate only can.

Open " Templates " child option, doubleclick the pattern plate of associated webpage, at that time pattern plate was entered can compile position, maize area disappears, after the content that changed pattern plate, dialog box of a clew can appear when saving: "Following webpage used current pattern plate, whether to undertake updating? " (if graph 2) is clicked " Update " , right now, all is based on pattern plate to found associated webpages in the website will get updating (the 3) that be like a graph.

 

Graph 2

 

Graph 3

As similar as pattern plate, the library of DW MX appears more agile, in " Assert " click on option card " Library " , open a library, there are any elements in temporary library, we an element that the warehouse should make in the webpage, be like form, image, in pulling library face plate directly can (following graph) .
  

Attention, the element in the library is image or literal itself merely anything but, and the code that these picture form in still including a webpage. Accordingly, we also can resemble pattern plate in same, identical library element is added on the webpage, thereby the webpage with batch production similar style. At this moment, we should procrastinate in element of lieutenant general of library face plate only return new webpage to go up can, and relevant code can duplicate automatically to go up to new webpage.

And, library element also can realize the batch of the website to update, we click library element in library face plate, make the libra ry is entered can compile position (the 5) that be like a graph, when changed library element and undertaking saving, always used the webpage of library element, can undertake synchronism is updated automatically.
 
 
Graph 5

Finally, compensatory to still having a bit newlier automatically: If a webpage was to apply pattern plate to generate, when be being updated automatically however, want to carry it original state again, do not update together as the webpage of site the others, need to click only " Modify/Templates/Detach From Templates " , right now, this webpage gets no longer the tie of pattern plate, need hand moves ability to update a webpage.

Dreamwaver MX and ASP.NET(6)

6. Found a record to revise a page

Relevant introducing (attention: To can display code, all code are in under " < " later and " > " before added blank space, discomfort is excused more please! ) :

Logarithm occupies add, revise, delete 3 be pair of databases main operations. This section introduction revises record share.

STEP 1 designs modification circuit

Generally speaking, need to undertake updating to designation record only, so need builds search page to undertake inquiring, show inquiry as a result in result page, let an user undertake modification to its. Replace the job through referring an operation to finish finally.

Above all, build inquiry page. In the procedure that establishs Dataset, we can pass data filter Filter to choose requires data. Because we will click the catenary fetch in DataList to arrive at this page, choose URL Parameter so and use key word CODE to choose nee ds page.


[Graph 6-1 chooses data]

For this, modify.aspx file is built in the site, add plan of DataSet as above.

Step2 builds detail page

To produce a link, should build navigation page above all. Can be opposite in the 3rd DataGrid that builds in the section the page is revised achieve such navigation result. The form of DataGrid is revised, data can install the character that has a link to show likewise. Also can realize same function in DataList and Repeater likewise, it is to install a super catenary to receive detail page.

Open original Location2.aspx document, revise former DataList type. Choice DataListm clicks Edit Columns(to be like graph 6-2) . Playing the DataGrid form that give to design a dialog box (in graph 6-3) , can be the type setting of Location_name Hyperlink. Pitch on Location_name, click pushbutton of Change Column Type to change for Hyperlink.


[Graph 6-2 Edit Columns. . ..


[Graph 6-3 installs Hyperlink]
Set following plans to Hyperlink,


[Graph 6-4 setting links key word]

Indication data region Location_name, join key word is Code, need jumps the page that turns is Modify.aspx page. The specific network address link after clicking a link will is
Http://yoursite/modify.aspx? The value of the Code of the record that CODE= place clicks

And the record that the value of the Code that Modify.aspx page also will come to through passing inquires to place needs from inside the database.

To data is updated in Modify.aspx page, use watch sheet with respect to need. This binds data logging and input casing with respect to need calm. Similar in the kind that calm data ties in Dreamweaver MX and Dreamweaver UltraDev. the page the setting is like graph 6-5. Build 6 Text Field, a HiddenField, pushbutton of a Submit, put proper place. Among them HiddernField is worth with the CODE that records at saving this. Because Code value is key word, do not want a change so.


[Page of graph 6-5 Modify.aspx]

Click Binding label, will specific data procrastinate to it corresponding Text Field. Can set the indication kind of data in Format at the same time. And likewise OK bind all attribute of Text Field and data source calm. The first when choose a record next pulling


[Type of data of 6-7 of graph of graph 6-6 Binding] [chooses] [graph 6-8 binds calm attribute]

List, install the Text Field attribute that is bound to decide by data source.
STEP 3 data is newer

In updating the Server Behaviors in can clicking Application face plate as to data " + " pushbutton, choose Update Record.


[Graph 6-9 chooses Update Record]


[Graph 6-10 installs correlation]

In shooting the dialog box that give, the data source correlation that needs to will input casing and photograph correspondence to update rises, set data kind. Among them CODE should be key word namely Primary Key. Be similar to the page of Insert Record, the setting is added successfully and add failure to jump even the page that turns.

Can preview the page that has made now. Input network address Http://yoursite/location3.aspx, can see the page of the 6-11 that be like a graph.


[Page of graph 6-11 Location3.aspx is browsed]

One of Location_name can be clicked, will jump to detail page Modify.aspx.


[Graph 6-12 updates a page to preview]
Through Modify.aspx the page can revise existing data, can refer incident to update data through expressing sheet.

The main code that its update is as follows:

<MM:UPdate
Runat="server "

CommandText='<%# "UPDATE LOCATIONS SET CITY= ? , STATE_COUNTRY= ? , FAX= ? , TELEPHONE= ? , ADDRESS= ? WHERE CODE= ? "% >'

ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNEC TION_STRING_location") % >'

DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_location") % >'

Expression='<%# Request.Form("MM_update") = "form1" % >'

CreateDataSet="false "

SuccessURL='<%# "location3.aspx" % >'

Debug="true "

>

<Parameters>

<Parameter Name="@CITY" Value='<%# IIf((Request.Form("city" )<>Nothing) , request.Form("city") , "") % >' Type="WChar" />

<Parameter Name="@STATE_COUNTRY" Value='<%# IIf((Request.Form("state" )<>Nothing) , request.Form("state") , "") % >' Type="WChar" />

<Parameter Name="@FAX" Value='<%# IIf((Request.Form("fax" )<>Nothing) , request.Form("fax") , "") % >' Type="WChar" />

<Parameter Name="@TELEPHONE" Value='<%# IIf((Reques t.Form("tele" )<>Nothing) , request.Form("tele") , "") % >' Type="WChar" />

<Parameter Name="@ADDRESS" Value='<%# IIf((Request.Form("address" )<>Nothing) , request.Form("address") , "") % >' Type="WChar" />

<Parameter Name="@CODE" Value='<%# IIf((Request.Form("hiddenField" )<>Nothing) , request.Form("hiddenField") , "") % >' Type="WChar" />

</ Parameters >

</ MM:UPdate >

Dreamweaver MX is to pass Mm:uPdate will express those who know updated code. Its format and MM:INsert is similar.

DreamwaverMX and ASP.NET(5)

5. Found leave a message page----Data test and verify accuses reach add data

Relevant introducing:

Data validity is website place is indispensible. For easier examine the data that the person that use inputs is accurate, ASP.NET offerred data test and verify to accuse for process designing personnel. The data test and verify that ASP.NET offers accuses include. (Attention: To can display code, all code are in under " < " later and " > " before added blank space, discomfort is excused more please! ) :

Accuse

Function

RequiredFieldValidator

Examine whether does some input field have data to input

RangeValidator

Examine whether is the data that some input field inputs inside specific limits

CompareValidator

Examine whether some input field is equal to, do not be equal to, be more than, do not be less than, be less than

ValidationSummary

Listed and all did not accuse through what examine

RegularExpressionValidator

Examine whether is some column accorded with criterion expression is regular

CustomValidator

Decide regulation of test and verify oneself



STEP 1 designs a page
We go out with form design first probably frame. Because the COMMENTS in the database has in the watch


[Frame of graph 5-1 database]

) of COMMENT_ID(automatic number, FIRST_NAME(text) , LAST_NAME(text) , TELEPHONE(text) , EMAIL(text) , SUBMIT_DATE(date / time) , COMMENTS(remarks) , ANSWERED(Boer value) wait for a field. The page that pursues as follows was designed in the site according to needing us, name for Reg.aspx.


[Graph 5-2 first page]

Among them COMMENT_ID, can add automatically by ACCESS, ANSWERED does not need him user to add. In the acquiescent value of SUBMIT_DATE the setting is Now() , can keep the date that adds a record automatically by ACCESS.

In the ASP page previously, we can be passedWill install input casing to come data-in. Textbox is contained to accuse in ASP.NET will accept data, grammar is as follows:

<Asp:tExtbox Id= &q uot; ... " Runat= " Server " other property / >

Can add Textbox to accuse in DreamweaverMX through clicking quick pushbutton. Setting ID is passed in shooting the dialog box that give, ) of type of Text Mode(dialog box, tool Tip(namely the mouse is hanged at accusing a clew) that go up, and Layout(style designs) , style Information(is used at installing) of input character format and Textbox frame format, will install accuse. Next graphs are the setting dialog box of Textbox.


[Graph 5-3 Textbox installs a dialog box 1]




[Graph 5-4 Textbox installs a dialog box 2]


[Graph 5-5 Textbox installs a dialog box 3]

As a result of data the character with COMMENT need much input, so need uses the Textbox that much input goes. The linage that needs a setting to Text Mode is MultiLine and input place to need only (Rows) can.

To produce additive event, still need a pushbutton. Click Forms label, click " Button " pushbutton is added.

The use of STEP2 data test and verify

As a result of First_name, last_name, telephone, email must be inputted, forget an input to prevent an user so, can add RequiredFieldValidator to accuse come test and verify accuses. Because accuse a meeting to have in occurrence test and verify by accident the content that the position that is in in its below the circumstance shows to test and verify has been illogical, reason should put data test and verify to accuse in proper place.

Of RequiredFieldValidator data tes t and verify accuse a grammar to be as follows:

<Asp:RRunat= of EquiredFieldValidato other property " Server " > make mistake information</ Asp:REquiredFieldValidator >

Or

<Asp:REquiredFieldValidator ErrorMessage=" makes mistake Runat= of information " other property " Server " / >

After clicking More Tags, the Validation Server that chooses ASP.NET Tags can see the data test and verify that has different kind control an option. We need to add test and verify to accuse an Asp:R at the back of the input casing of First_nameEquiredFieldValidator.

A setting accuses in RequiredfieldValidator in the window, control To Validate is to be the input that accuses a relevant couplet with this data test and verify to accuse ID, and the information that when data test and verify fails, Error Message shows namely. At the same time we can pass setting Layout, style Information wi ll choose wants form.


[Graph 5-6 test and verify controls an option]


[Graph 5-7 RequiredfieldValidator accuses a setting dialog box]

Use same method to add test and verify of another RequiredFieldValidato data to accuse at the back of Last_Name input casing at the same time. We can be saved now, preview a page. Should not input the data-in in casing in First_name and Last_name and when clicking Submit pushbutton, with respect to message of failure of meeting occurrence test and verify. If pursue,5-8 place is shown.

But we need a lot of time the data with valid test and verify, for instance zip code is 6 certainly, the Email address of the input needs to have specific form. Here uses RegularExpressionValidator to come with respect to need the effectiveness of data of test and verify. In registering a page originally, telephone and Email can be used come here accuse come test and verify.


[Dialog box of graph 5-8 RequiredfieldVa lidator]




[Graph 5-9 Email installs attribute]

Accuse an additive method with RequiredfieldValidator test and verify similar, click " More Tags. . " the choice adds data test and verify to accuse. Different place installs Validation Expression namely. Because Telephone needs to input 7-10 number, need to install as follows:

[0-9]{7, 10}

Its grammar is as follows:

[] : Use the character with acceptability definition, show small letter like A-z ' A ' - ' Z ' it is acceptability character, a-zA-Z shows acceptability all letter, and 0-9 expresses to be able to accept all figures.

{} : Use the character number that the definition must input, {7, 10} expresses to be able to input 7-10 character, {0, } expresses to be able to accept 0- many more infinite character.

' . ' : Express to input aleatoric character. . {0, } states acceptability 0- is many more infinite aleatoric character.

| : Express OR(or) , for example [A-Za-z] {3} | [0-9]{3} expresses to be able to accept 3 English letter or it is 3 numbers

() : Read to go to the lavatory, contain | Symbolic string is met normally by () in. For example ([A-Za-z]{3} | [0-9]{3}) .

\ : If contain [] , {} , () , | Wait for special symbol to must add \ before these string. .

Following it is a few more commonly used example:

Email: . {1, }@ . {1, }/ . . {1}

Phone (include area size) : \([0-9]{3, 4})\)[0-9]{7, 8}

Although cannot be its real data in order to make sure the user is inputted, but examine accuse can make sure the format is right.


[Graph 5-10 previews a page]

Accuse as to CompareValidator, its method of each attribute setting is as follows:

Control To Compare

The setting is as relative as its accuse

Control To Validate

Setting and its photograph accuse associatedly

Value To Compare

Set relative value

Operator

Set relative concernSet relative concernBe equal to, do not be equal to, be more than, be more than be equal to, be less than, be less than be equal toBe less than be equal to

Type

Comparative data type

Error Message

Indication information



[Graph 5-11 CompareValidator installs a dialog box]

CustomValitor setting method with its he accuses similar, but need handwritten function OnServerValidate(to be in Events) come data of test and verify.


[Graph 5-12CustomValitor installs a dialog box]

For example

<Asp:CUstomValidator Id= " CusValid " Runat= " Server " ControlToValidate= accuses an OnServerValidate= " TheFunction " > information signing up for a fault</ Asp:CUstomValidator >

<Script Language= " Vb " Runat= " Server " >

Function TheFunction(sender As Object, , value As String) As Boolean

... . .
Return...

End Function

</ Script >

This accuses a meeting to transfer TheFuncion function, if return,False can h ave news signing up for a fault.
RangeValidator accuses


[Graph 5-12 RangeValidatorr installs a dialog box]

Can pass Mininum Value() of the least value, maxinum Value(maximum) the limits that will set a value. Can set relative kind at the same time through Type, for example " String " , " Integer " wait. Other setting is similar to the setting of other component.

Still have a package: VAlidationSummary. Among them HeaderText setting looks up character, displayMode sets indication pattern, its are specific attribute is as follows:

Property value

Meaning

List

BulletList

SingleParagraph

ErrorMessageBranch shows

ErrorMessageCent show

ErrorMessageShow same travel



[Attribute of graph 5-13 ValidationSummary installs a dialog box]

Acting attach is main the source code of block:

<Table Width="75%" Height="594" Border="1" Cellpadding="1" Cellspacing="0" Bordercolor="#999999" >

<Tr>

<Td Width="22%" Height="22" >First Name</ Td >

<Td Width="38%" ><Asp:tExtbox BackColor="#CCCCCC" ForeColor="#0033FF" ID="first" Runat="server" TextMode="SingleLine" ToolTip="Please Input The First Name" MaxLength="40" BorderWidth="1" Width="200"/ ></ Td >

<Td Width="40%" ><Asp:rEquiredfieldvalidator BackCo lor="#CCCCCC" ControlToValidate="first" ErrorMessage="RequiredField" ForeColor="#FF0000" ID="validname" Runat="server" /></ Td >

</ Tr >

<Tr>

<Td Height="22" >Last Name</ Td >

<Td ><Asp:tExtbox BackColor="#CCCCCC" ForeColor="#0033FF" ID="Lastname" Runat="server" TextMode="SingleLine" Width="200" ToolTip="Please Input The Last Name" BorderWidth="1"/ ></ Td >

<Td ><Asp:rEquiredfieldvalidator BackColor="#CCCCCC" ControlToValidate="Lastname" ErrorMessage="RequiredField" ForeColor="#FF0000" ID="vailLast" Runat="server" /></ Td >

</ Tr >

<Tr>

<Td Height="22" >Telephone</ Td >

<Td ><Asp:tExtbox BackColor="#CCCCCC" BorderWidth="1" ForeColor="#0066FF" ID="telephone" Runat="server " TextMode="SingleLine" ToolTip="Please Input Your Telephone" Width="200" / ></ Td >

<Td><Asp:rEgularexpressionvalidator BackColor="#CCCCCC" ControlToValidate="telephone" ErrorMessage="7-10 Numbers Required" ForeColor="#FF0000" ID="vailtel" Runat="server" ValidationExpression="[0-9]{7, 10}" /><Asp:rEquiredfieldvalidator BackColor="#CCCCCC" ControlToValidate="telephone" ErrorMessage="RequiredField" ForeColor="#FF0000" ID="vailtel2" Runat="server" / ></ Td >

</ Tr >

<Tr>

<Td Height="22" >Email</ Td >

<Td ><Asp:tExtbox BackColor="#CCCCCC" BorderWidth="1" ForeColor="#0033FF" ID="email" Runat="server" TextMode="SingleLine" ToolTip="Please Input Your E-mail" Width="200"/ ></ Td >

< Td ><Asp:rEgularexpressionvalidator BackColor="#CCCCCC" ControlToValidate="email" ErrorMessage="Invaliate Email Address" ForeColor="#FF0000" ID="valiemail" Runat="server" ValidationExpression=" . {1, }@ . {3, }" /><Asp:rEquiredfieldvalidator BackColor="#CCCCCC" ControlToValidate="email" ErrorMessage="Required Field" ForeColor="#FF0000" ID="valiemail2" Runat="server" /></ Td >

</ Tr >

<Tr>

<Td Height="22" Colspan="3" ><Div Align="center" >Comments</ Div ></ Td >

</ Tr >

<Tr>

<Td Height="188" Colspan="3" ><Div Align="center ">

<Asp:tExtbox BackColor="#CCCCCC" BorderWidth="1" ForeColor="#0033FF" ID="Comments" Rows="16" Runat="server" TextMode="MultiLine" ToolTip="Please Input The Comments" Width="400"/ >

</ Div >

<Div Align="center "><Br >

</ Div ></ Td >

</ Tr >

<Tr >

<Td Height="71" Colspan="3" ><Div Align="center" >

<Asp:vAlidationsummary BackColor="#CCCCCC" DisplayMode="BulletList" ForeColor="#FF0000" HeaderText=" has by accident content includes:" ID="valSum" Runat="server" ToolTip="Error" / >

</ Div ></ Td >

</ Tr >

<Tr>

<Td Height="22" Colspan="3" ><Input Type="submit" Name="Submit" Value="Submit ">

</ Td >

</ Tr >

</ Table >

The form is as follows:


[Graph 5-14 is previewed]
STEP 3 data is added

The function that adds data as to implementation is simpler, we can install the function that adds data through guide, make DreamweaverMX automatic add code. Click the Server Behaviors label in Application, click after that + pushbutton chooses Insert Record(to be like graph 5-15) from which.

Want to determine the data cause that be linked together above all in shooting the dialog box that give. If was not found in list, can click Define pushbutton to set data source (the 5-16) that be like a graph. Insert Into Table is used at installing need to add the table of data, can mix text casing in Columns corresponding data source is opposite should, set data kind. On Success, the page that if add number to turn according to jumping successfully,the setting is in Go To. On Failure, can install in Go To add data failure to jump the page that turns, at the same time we also can choose Display Debugging Information On Failure the setting is adding addend to show information signing up for a fault according to failing.


[Graph 5-15 chooses Insert Record]


[Graph 5-16 data adds set]

Le t us read additive code:

<MM:INsert
Runat="server "

CommandText='<%# "INSERT INTO COMMENTS (COMMENTS, EMAIL, FIRST_NAME, LAST_NAME, TELEPHONE) VALUES (? , ? , ? , ? , ? ) " % >'

ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_location") % >'

DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_location") % >'

Expression='<%# Request.Form("MM_insert") = "form1" % >'

CreateDataSet="false "

SuccessURL='<%# "index.htm" % >'

FailureURL='<%# "reg.aspx" % >'

Debug="true "

>

<Parameters>

<Parameter Name="@COMMENTS" Value='<%# IIf((Request.Form("Comments" )<>Nothing) , request.Form("Comments") , "") % >' Type="WChar" />

<P arameter Name="@EMAIL" Value='<%# IIf((Request.Form("email" )<>Nothing) , request.Form("email") , "") % >' Type="WChar" />

<Parameter Name="@FIRST_NAME" Value='<%# IIf((Request.Form("first" )<>Nothing) , request.Form("first") , "") % >' Type="WChar" />

<Parameter Name="@LAST_NAME" Value='<%# IIf((Request.Form("Lastname" )<>Nothing) , request.Form("Lastname") , "") % >' Type="WChar" />

<Parameter Name="@TELEPHONE" Value='<%# IIf((Request.Form("telephone" )<>Nothing) , request.Form("telephone") , "") % >' Type="WChar" />

</ Parameters >

</ MM:INsert >

MM:INsert is the label that Dreamweaver adds a database with Yu Tian, parameter is used at assigning the numerical value of parameter namely.

The code in front is used at appointing a database namely link and the pa ge that turns jumps after adding a success, add failure to display wrong message, still have associated form.

Him MacroMedia develops these, need the support of a few component of Macromedia, with the standard code pattern of on the net a lot of ASP.net is different now. Ask everybody to consult code when the standard code form that does not want according to this code wrong understanding ASP.net. Standard code format everybody can consult Www.gotdotnet.com. If everybody wants to write standard code, can use WebMatrix, download address: Http://www.asp.net/webmatrix/download.aspx? Tabindex=4

DreamwaverMX and ASP.NET(4)

4. uses DataList component to show data set

Relevant introducing:

The Repeater that DataList is functional aggrandizement accuses, besides having the function with original Repeater, the pen that still can set order for goods to show data all right is counted (RepeatColumn) , by option example (SelectedItemTemple) , edit an example (EditTemplate) . But the data arrangement that DataList meeting general outputs is outputted in form, and Repeater criterion more devoted to the definition of example, won't add any HTML mark. (Attention: To can display code, all code are in under " < " later and " > " before added blank space, discomfort is excused more please! Discomfort is excused more please!!

STEP 1 builds a page

The page that we should build is shown with respect to following plan institute. Can play a detailed data when we click the super link of Detail, no less than the first in be shown. When clicking Close, detailed data can be shut, restore former model.


[Graph 1-1 page demonstrates]

Choose to want indication data first. The data to show Europe (namely Region_ID=3) , we can pick the data that chooses Region_ID=3 surely in Dataset set.


[Graph 1-2 data is chosen]

Accuse with Datalist do a data brief indication page. We build a page that does not have data first. Choose the Server Behavior in Application face plate next. Click " + " , choose DataList.


[Graph 1-3 DataList chooses a page]

In shooting the dialog box that come out, we can join page pattern plate according to needing corresponding place.
U Header: Express head pattern plate
U Item: Data pattern plate
U Alternating Item: Across shows pattern plate
U Edit Item: Modification pattern plate ((acquiesce is to was not shown those who come, must answer ability to be able to show through incident)
U Selected Item: The pattern plate of the indication after pitch on (same beard answers ability to be able to show through incident)
U Separator: Disjunctive pattern plate
U Footer: Express bottom pattern plate


[Graph 1-4 edits DataList dialog box]
We can connect the pattern plate that HTML code adds to make place need in associate with Contents, also can add data at the same time through clicking pushbutton. After clicking second pushbutton, can play a data the data that the dialog box lets you choose to need. Join in Contents input casing

<%# DataBinder.Eval(Container.DataItem, "Data ") % >

code is used at showing data.


[Graph 1-5 adds data]

To achieve previewed result, join code in Header above all: LOcation Name. In order to shows caption. Code joins in Item:

<%# DataSet1.FieldValue("LOCATION_NAME" , container) % > , will make each headline with Location_name.

Code is joined in Alternating Item

<Fontcolor="#0000F F" ><%#DataSet1.FieldValue("LOCATION_NAME" , container)% ></ Font >

Will show data with different font color.

Although Selected Item can not show immediately, but we still should write down code, call in order to have later. Following:

Address:

<%# DataSet1.FieldValue("ADDRESS" , container) % >

<BR >

City:

<%# DataSet1.FieldValue("CITY" , container) % >

<BR >

Telephone:

<%# DataSet1.FieldValue("TELEPHONE" , container) % >

<BR >

Click OK, preview a page then, the effect that pursue below even if piles up with the previous generation. Meeting such as our goes coming true show Selected Item of the effect.


[Graph 1-6 is previewed at first]
A differentia of DataList distinction Repeater can be installed namely one-way show much pen data, can undertake installing in DataList editor window.


[Graph 1-7 setting is one-way show much pen data]

Choice Use Line Breaks just have<BR > mark has separate data. Choosing Use A Table is the formal output with form, and the pen number that can decide one-way indication data through installing Table Columns.

STEP2 writes code

The need when Selected Item shows through incident, so we need to build pushbutton in order to start incident.
J adds LinkButton, in order to produces event. Move cursor of source code window<ItemTemplate > and</ in ItemTemplate > , click More Tags, asp:L chooses in shooting the dialog box that giveInkButton accuses.


[Dialog box of graph 2-1 Tag Chooser]

In editing LinkButton dialog box, install the attribute of LinkButton. The name is inputted in ID input casing: DEtail,

Input in Command Name " Detail " the order that is used at producing event, in Text dialog box input Detail(will be shown come)   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of      


[Graph 2-2 LinkButton edits casing]

Needs color chooses in Layout again next, click OK, can generate code.

<Asp:LInkButton BackColor="#FFFFFF" CommandName="Detail" ForeColor="#000000" ID="Detail" Runat="server" Text="Detail" ></ Asp:LInkButton >

To be in across shows in also have such effect, we need to be in<AlternatingItemTemplate > and</ same code also is inserted in AlternatingItemTemplate > .
Pluck the sample plate after the choice that come out to shut at the same time, same need generates an order, want to add many Linkbutton so. Need to be in so<SelectedItemTemplate ></ code inserts in SelectedItemTemplate > :

<Asp:LInkButton BackColor="#FFFFFF" CommandName="Close" ForeColor="#000000" ID="Close" Runat="server" Text="Close" ></ Asp:LInkButton >
K had an order, we still need to use a program to explain this order. The process is not actually complex, need to join one fraction code only. In<Head ></ following code add in Head > :

<Script Language="VB" Runat="server" >

Sub DataList_ItemCommand(sender As Object, e As DataListCommandEventArgs)

If E.CommandSource.CommandName="Detail" Then

DataList1.SelectedIndex=e.Item.ItemIndex

ElseIf E.CommandSource.CommandName="Close" Then

DataList1.SelectedIndex=-1

End If

DataList1.DataBind()

End Sub

</ Script >

The order that the program can obtain you to click LinkButton (CommandName) will judge the order that should exe cute. It is E.Item.ItemIndex when the SelectedIndex attribute set of DataList, can open SelectedItemTemplate page. If the command is Close criterion the SelectedIndex attribute set of DataList is - 1(does not have data namely by pitch on) , criterion DataList can use ItemTemplate example shows this one data.

In<Asp:DCode is added even in AtaList > paragraph

OnItemCommand="DataList_ItemCommand "

With the relation of statement and block DataList_ItemCommand.

By " F12 " preview, the page can show the result of expect.


[Graph 2-3 is previewed finally edition]
Attach is main the source code of block:

Sub DataList_ItemCommand(sender As Object, e As DataListCommandEventArgs)

If E.CommandSource.CommandName="Detail" Then

DataList1.SelectedIndex=e.Item.ItemIndex

ElseIf E.CommandSource.CommandName="Close" Then

DataList1.SelectedIndex=-1

End If

DataList1.DataBind()

End Sub

<Form Runat="server" >

<Asp:DAtaList Id="DataList1 "
Runat="server "

RepeatColumns="1 "

RepeatDirection="Vertical "

RepeatLayout="Flow "

DataSource= "<%# DataSet1.DefaultView % > "

OnItemCommand="DataList_ItemCommand" >

<HeaderTemplate >

Location Name</ HeaderTemplate >

<ItemTemplate >

<%# DataSet1.FieldValue("LOCATION_NAME" , container) %>

<Asp:lInkbutton BackColor="#FFFFFF" CommandName="Detail" ForeColor="#000000" ID="Detail" Runat="server" Text="Detail" ></ Asp:lInkbutton >

</ ItemTemplate >

<AlternatingItemTemplate ><Font Color="#0000FF" >

<%# DataSet1.FieldValue("LOCATION_NAME" , container) % >

</ Font >

<Asp:lInkbutton BackColor="#FFFFFF" CommandNa me="Detail" ForeColor="#000000" ID="Detail" Runat="server" Text="Detail" ></ Asp:lInkbutton ></ AlternatingItemTemplate >

<SelectedItemTemplate >Address:

<%# DataSet1.FieldValue("ADDRESS" , container) % >

<BR >

City:

<%# DataSet1.FieldValue("CITY" , container) % >

<BR >

Telephone:

<%# DataSet1.FieldValue("TELEPHONE" , container) % >

<BR >

<Asp:LInkButton BackColor="#FFFFFF" CommandName="Close" ForeColor="#000000" ID="Close" Runat="server" Text="Close" ></ Asp:LInkButton >

</ SelectedItemTemplate >

</ Asp:DAtaList>

</ Form >

DataList still has the model of Edit Item, basically use at data to update. This book is met tail section introduces.