跳转问题

问题描述:在一个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;                   
                }
            }
}

你可能感兴趣的:(问题)