小编Han*_*ome的帖子

ASPNET:确保此代码文件中定义的类与'inherits'属性匹配

namespace ASPMultilingual { 
public partial class _Default : System.Web.UI.Page
{
    ResourceManager rm;
    CultureInfo ci;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Lang"] == null) { 
            Session["Lang"] ="en-US";
        }

        if (!IsPostBack)
        {
            LoadString();

        }

    }

    private void LoadString(){

        Thread.CurrentThread.CurrentCulture = new CultureInfo(Session["Lang"].ToString());
        //rm = new ResourceManager("ASPMultilingual.App_GlobalResources.Lang", Assembly.GetExecutingAssembly());
        ResourceManager rm = new ResourceManager("ASPMultilingual.Lang", System.Reflection.Assembly.Load("ASPMultilingual"));
        ci = Thread.CurrentThread.CurrentCulture;


        btnLogIn.Text = rm.GetString("Login", ci);
    }

    protected void btnLogIn_Click(object sender, EventArgs e)
    {
        string ID = Request.Form["txtID"];
        String password = Request.Form["txtPassword"];
        string strConString = ConfigurationManager.ConnectionStrings["SOConnectionString"].ConnectionString; …
Run Code Online (Sandbox Code Playgroud)

c# asp.net

4
推荐指数
1
解决办法
9124
查看次数

标签 统计

asp.net ×1

c# ×1