<% # databinder.eval (container.DataItem," Title ")%> b> price: <% # DataBinder.Eval (Container.DataItem, "price", "$ {0}")%> td> tr> table> ItemTemplate>
asp: datalist>
form>
center> body> html>
The logic code is as follows: 040825.aspx.cs
Using system.data; using system.data.sqlclient;
Using system.web.ui; using system.web.ui.htmlControls; using system.web.ui.webcontrols;
Public class sumup: Page {
Public TEXTBOX Name; Public DropdownList Catagory; Public Label Msg; Public DataList Mylist; PUBLIC
public void SubmitBtn_Click (Object sender, EventArgs e) {SqlConnection myConnection = new ( "; UID = sa; PWD = 123456; Initial Catalog = pubs Data Source = localhost"); SqlConnection SqlDataAdapter myCommand = new SqlDataAdapter ( "select * from titles where Type = '" catagory.selectedItem.Value "' ", myconnection;
DataSet DS = New DataSet (); MyCommand.Fill (DS, "Titles"); mylist.dataroup = ds.tables ["titles"]. Defaultview; mylist.database ();
Msg.Text = name.text ", you have selected:" Catagory.SelectedItem.Value;
MyConnection.Close ();}}
Advertising rotor code is as follows: ads.xml
XML Version = "1.0" Encoding = "GB2312">
http://www.baidu.com/img/slogo.gif imageurl> http://www.baidu.com navigateURL> Baidu alternatetext> < Impressions> 60 impressions> ad>
http://www.chinaz.com/ai/zzzbanner.gif imageurl> http://www.baidu.com navigateURL> China Webmaster Station AlternateText> 70 impressions> ad>
http://www.chinaz.com/ai/ads8.gif imageurl> http://www.baidu.com navigateURL> Advertising Media alternatetext> 80 impressions> ad>
http://idc.chinaz.com/chinaz_com/html/images/union_265.gif imageurl> http://www.baidu.com navigateURL> 265 traffic AC platform alternatetext> 90 impressions> ad>
Advertisements>
'//
The road, the extension of the flood, I am persisted, for the ideal of the heart.
转载请注明原文地址:https://www.9cbs.com/read-123332.html