DropDownList1.SelectedItem.Text 取值 5
protectedvoidPage_Load(objectsender,EventArgse){if(Session["dlm"].ToString()=="admin"...
protected void Page_Load(object sender, EventArgs e)
{
if (Session["dlm"].ToString() == "admin")
{
Button3.Enabled = true;
}
else
Button3.Enabled = false;
}
protected void Button1_Click(object sender, EventArgs e)
{
//if (Session["dlm"].ToString() != "")
//{
string filePath = "", fileExtName = "", mFileName,mpath="";
if ("" != FileUpload1.PostedFile.FileName)
{
switch (DropDownList1.SelectedItem.Text)
{
case "初一级ppt":
mpath = Server.MapPath("初一级");
break;
case "初一级word":
mpath = Server.MapPath("初一级");
break;
case "初二级ppt":
mpath = Server.MapPath("初二级");
break;
}
DropDownList1.SelectedItem.Text总是获得第一行的值
DropDownList1.Text 是value的值 但是 value我是设成路径的 不能该了 改了和麻烦 给为高手 指点一下啊 展开
{
if (Session["dlm"].ToString() == "admin")
{
Button3.Enabled = true;
}
else
Button3.Enabled = false;
}
protected void Button1_Click(object sender, EventArgs e)
{
//if (Session["dlm"].ToString() != "")
//{
string filePath = "", fileExtName = "", mFileName,mpath="";
if ("" != FileUpload1.PostedFile.FileName)
{
switch (DropDownList1.SelectedItem.Text)
{
case "初一级ppt":
mpath = Server.MapPath("初一级");
break;
case "初一级word":
mpath = Server.MapPath("初一级");
break;
case "初二级ppt":
mpath = Server.MapPath("初二级");
break;
}
DropDownList1.SelectedItem.Text总是获得第一行的值
DropDownList1.Text 是value的值 但是 value我是设成路径的 不能该了 改了和麻烦 给为高手 指点一下啊 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询