相关疑难解决方法(0)

用于构建的流行文件夹结构

我想知道在项目中组织构建资产和源代码的流行或最佳方法是什么?

directory build-process

25
推荐指数
5
解决办法
3万
查看次数

将具有配置文件的网站转换为Web应用程序项目

我正在尝试将现有网站转换为Web应用程序项目,并且我在使配置文件工作时遇到很大问题.

网站项目中的代码隐藏的一个例子是

注册与 - 角色和profile.ascx.cs

    // Add the newly created user to the default Role.
    Roles.AddUserToRole(CreateUserWizard1.UserName, wsatDefaultRole);

    // Create an empty Profile for the newly created user
    ProfileCommon p = (ProfileCommon)ProfileCommon.Create(CreateUserWizard1.UserName, true);

    // Populate some Profile properties. Values are located in web.config file
    p.Company.Company = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("txbOfficeName")).Text;
    p.Company.Address = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("txbOfficeAddress")).Text;
    p.Company.City = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("txbOfficeCity")).Text;
    p.Company.State = ((DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("ddlStates")).SelectedValue;
    p.Company.PostalCode = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("txbOfficeZip")).Text;
    p.Company.Phone = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("txbContactPhone")).Text;
    p.Company.Fax = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("txbContactFax")).Text;
    p.Preferences.Newsletter = ((DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("ddlNewsletter")).SelectedValue;

    // Save profile - must be done since we explicitly created …
Run Code Online (Sandbox Code Playgroud)

c# asp.net profiles

5
推荐指数
1
解决办法
1531
查看次数

标签 统计

asp.net ×1

build-process ×1

c# ×1

directory ×1

profiles ×1