zoukankan      html  css  js  c++  java
  • how to Customize Lightswitch beta 2 Login Screen to your Own design (如何定制LS的登录界面)

    http://lightswitchdevelopment.wordpress.com/how-to-customize-lightswitch-beta-2-login-screen-to-your-own-design/

    1. Switch your LightSwitch solution to “File View”

    2. Click on Show All Files

    3. Right click on the Server Generated project and Add New Item

    4. Add the ASPX page called SingIn with the appropriate code.

      <form id=”form1″ runat=”server”><div>

    <p>Sign in</p>

    <asp:Label ID=”Label1″ runat=”server” Text=”User Name”></asp:Label>

    <asp:TextBox ID=”TextBox1″ runat=”server” Width=”128px”></asp:TextBox>

    <asp:Label ID=”Label2″ runat=”server” Text=”Password”></asp:Label>

    <asp:TextBox ID=”TextBox2″ runat=”server”

    TextMode=”Password” Width=”128px”></asp:TextBox>

    <asp:Button ID=”BtnSingIn” runat=”server” Text=”Sign In”

    onclick=”BtnSingIn_Click”/>

    <center><label id=”lblForgot”>Forgot password </label>

    <a href=”https://www.in4doctor.com” target=”_self”>click here</a></center>

    </div>

    </form>

    5- Now we need to write BtnSingIn_Click event:

    protected void BtnSingIn_Click(object sender, EventArgs e)

    {

    Microsoft.LightSwitch.Security.ServerGenerated.Implementation.User user;

    Microsoft.LightSwitch.Security.ServerGenerated.Implementation.AuthenticationService x = new Microsoft.LightSwitch.Security.ServerGenerated.Implementation.AuthenticationService();

    user = x.Login(TextBox1.Text, TextBox2.Text, false, “”);

    if (user != null)

    {

    Response.Write(“<script>window.parent.location=\”http://www.StudentCourse.Com/default.htm\”</script>”);

    } // you need to change the URL according to your Project

    }

    6. We now need to get SingIn.aspx to be included in the build output.  Right click on your project in solution explorer and select Unload Project.

    7. Right click the project and select Edit.

    8. Search the file and for default.htm.  You should find a section called _BuildFile.

    9. Underneath the _BuildFile section for default.htm, add the following.

    <_BuildFile Include=”ServerGenerated\Singin.aspx”>
    <SubFolder>
    </SubFolder>
    <PublishType>
    </PublishType>
    </_BuildFile>

    10. Now Insert your login account  the and enjoy

  • 相关阅读:
    C++ 11 右值引用以及std::move
    poj2299--B
    Linux Socket编程注意事项
    Using Qt to build an Omi App for iOS (and Android)
    openwrt 3g模块上网
    详谈隐藏Tabbar的几种方法
    ZOJ 3529 A Game Between Alice and Bob(博弈论-sg函数)
    uva 10574
    【MySQL案例】HA: GTID_MODE配置不一致
    Swift UIView 层次调整
  • 原文地址:https://www.cnblogs.com/zengxinle/p/2060364.html
Copyright © 2011-2022 走看看