H_J_H

------专用杂物房
posts - 26, comments - 1, trackbacks - 0, articles - 119

[导入]VS2005新控件之 BulletedList

Posted on 2006-05-28 15:03 H_J_H 阅读(103) 评论(0)  编辑 收藏 引用
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    
<title>无标题页</title>
</head>
<body>
    
<form id="form1" runat="server">
    
<div>
        无链接的文字列:
<br />
        
<br />
        
<asp:BulletedList ID="BulletedList1" runat="server" DataSourceID="SqlDataSource1"
            DataTextField
="address" DataValueField="au_id">
        
</asp:BulletedList>
        
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:pubsConnectionString %>"
            SelectCommand
="SELECT [au_id], [address] FROM [authors]"></asp:SqlDataSource>
        
<br />
        
<br />
        带链接的文字列:(没啥神秘的,就是把
<?xml namespace="" ns="http://msdn.microsoft.com/mshelp" prefix="MSHelp" ?><mshelp:link
            
keywords="P:System.Web.UI.WebControls.BulletedList.DisplayMode" tabindex="0">DisplayMode 属性设置为<MSHelp:link 
tabIndex=0 
keywords="F:System.Web.UI.WebControls.BulletedListDisplayMode.HyperLink">HyperLink</MSHelp:link>&nbsp;</mshelp:link><br />
        
<asp:BulletedList ID="BulletedList2" runat="server" DataSourceID="SqlDataSource1"
            DataTextField
="address" DataValueField="au_id" DisplayMode="HyperLink">
        
</asp:BulletedList>
        
<br />
        
<br />
        超链接按纽列:(就是把
<mshelp:link keywords="P:System.Web.UI.WebControls.BulletedList.DisplayMode"
            tabindex
="0">DisplayMode 属性设置为<MSHelp:link 
tabIndex=0 
keywords="F:System.Web.UI.WebControls.BulletedListDisplayMode.HyperLink">LinkButton</MSHelp:link>&nbsp;</mshelp:link><br />
        
<asp:BulletedList ID="BulletedList3" runat="server" DataSourceID="SqlDataSource1"
            DataTextField
="address" DataValueField="au_id" DisplayMode="LinkButton">
        
</asp:BulletedList>
    
    
</div>
    
</form>
</body>
</html>

还有不明白的直接看MSDN的帮助,实在还是不明白,可以Q我,虽然我不一定帮得了你,但是保证愿意和你一起探讨撒!

天轰穿 2006-05-28 15:03 发表评论

文章来源:http://thcjp.cnblogs.com/archive/2006/05/28/409991.html
只有注册用户登录后才能发表评论。