
dropdownlist 联动 ,第二个dropdownlist的取值总是(第一个选项)怎么解决? 20
usingSystem;usingSystem.Collections;usingSystem.Configuration;usingSystem.Data;usingS...
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using webwinscom.DAL.proClassIdTableAdapters;
namespace webwinscom.admin
{
public partial class addpro : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
string x = DropDownList1.SelectedValue;
string xx = "SELECT [Pro_name], [pro_ClassId] FROM [Pro_NameID] where pro_ClassId=" + x;
SqlDataSource2.SelectCommand = xx;
}
}
} 展开
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using webwinscom.DAL.proClassIdTableAdapters;
namespace webwinscom.admin
{
public partial class addpro : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
string x = DropDownList1.SelectedValue;
string xx = "SELECT [Pro_name], [pro_ClassId] FROM [Pro_NameID] where pro_ClassId=" + x;
SqlDataSource2.SelectCommand = xx;
}
}
} 展开
7个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询