日期:2014-05-18  浏览次数:20351 次

2005里BulletedList控件的超链接转页问题
弄一上午了,还是搞不定,晕了~~

我想实现,BulletedList里的数据行点击转到另一页,并把ID带去

我先在BulletedList的显示模示选择,DisplayMode= "HyperLink "   可转页没有写目标地址的属性.

如果选择DisplayMode= "LinkButton ",   OnClick= "BulletedList1_Click "   的事件里,
        protected   void   BulletedList1_Click(object   sender,   BulletedListEventArgs   e)
        {                                              
                string   cid   =   BulletedList1.DataValueField;     //这个值则不是数据库里的字段值,而是字段名.

                this.Response.Redirect(string.Format( "Content.aspx?cid={0} ",cid));

    怎么办呀,高手们帮帮忙~~~,谢了~~~~~~~~~~




------解决方案--------------------
司法
------解决方案--------------------
没有必要这样做,在前台进行处理就可以了
------解决方案--------------------


你把数据库字段绑定给RadioButtonList1 就行了 然后取选中的value值
------解决方案--------------------
直接将这个string.Format( "Content.aspx?cid={0} ",cid)绑定到BulletedList 的value上