尝试从页面设置宽度

时间:2016-05-16 11:32:32

标签: c# css asp.net

if ((bool)Session["Conect"])
{
    logdiv.Visible = false;
    Usernamec.InnerHtml = (string)Session["CurentUserid"];
    Connected.Visible = true;
    SqlCommand exp = new SqlCommand("SELECT xp FROM[User] Where Username = @username", c);
    exp.Parameters.AddWithValue("@username", (string)Session["CurentUserid"]);
    c.Open();
    Session["exp"] = (int)exp.ExecuteScalar();
    c.Close();
    int b = (int)Session["exp"] / 3;
    string a = b + "%";
    xp.Style.Add("width", a);
}

为什么它不起作用? (不是宽度不会改变的错误......)

0 个答案:

没有答案