跳转

说明:在一个DataList中,有一个模板列是DropDownList,还有一个模板列是LinkButton

操作:当我选择DropDownList之后,点LinkButton时,要把当前DropDownList选中的值传过去。

问题:传不过去

图片:

解决办法:

protected void gv_List_RowDataBound(object sender, GridViewRowEventArgs e)
{
          
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
             
             //传一个控件的值(在RowDataBound事件中)
                if (hlk_Flag.Text == JTSCM.Enum.ReceiveItemBatchEnum.Y.ToString())
                {
                    string openDialogJs = "openDialog('ReceiveBthManager.aspx?    selectWareHouse='+document.getElementById(\"{1}\").options                         [document.getElementById(\"{1}\").selectedIndex].value+ '&RECEIVEID=                                       {0}','btn_ShowInit');return false;";
                    hlk_Flag.OnClientClick = string.Format(openDialogJs, receiveID, ddl_whid.ClientID);
                    hlk_Flag.Enabled = true;                   
                }
            }
}

 

posted @ 2008-08-28 18:14  奋斗的萌丫头  阅读(115)  评论(0编辑  收藏  举报