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 to use Show Region of → of Server Behaviors Setting of behavior of → Show If DateSet Is Not Empty 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 serve 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. accuses 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.
Everybody still should write down 2. 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.
If 3. needs " 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:
<asp:HYperLinkColumn
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
<asp:HYperLinkColumn
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. Result.

No comments:
Post a Comment