2016-12-11 106 views
0

/////////事業部詳細改變股利位置

<div class="col-md-6 col-sm-6 col-xs-12 profile_left"> 
 
    <ul class="list-unstyled user_data"> 
 
    <li> 
 
     <i class="fa fa-map-marker user-profile-icon voilet"></i> 
 
     <asp:Label ID="lblArea" runat="server" Text="Area"></asp:Label> 
 
     <asp:Label ID="lblBlock" runat="server" Text="Area"></asp:Label> 
 
    </li> 
 
    <li> 
 
     <i class="fa fa-location-arrow user-profile-icon voilet"></i>Street 
 
     <asp:Label ID="lblStreet" runat="server" Text="-"></asp:Label>, Building 
 
     <asp:Label ID="lblBuilding" runat="server" Text="--"></asp:Label>, Floor 
 
     <asp:Label ID="lblFloor" runat="server" Text="Floor"></asp:Label>, Flat 
 
     <asp:Label ID="lblflat" runat="server" Text="Flat"></asp:Label> 
 
    </li> 
 
    <li> 
 
     <i class="fa fa-mobile user-profile-icon voilet"></i> 
 
     <asp:Label ID="lblMobile1" runat="server" Text="Mobile1"></asp:Label>- 
 
     <asp:Label ID="lblMobile2" runat="server" Text="Mobile2"></asp:Label> 
 
    </li> 
 
    <li> 
 
     <i class="fa fa-envelope-o user-profile-icon voilet"></i> 
 
     <asp:Label ID="lblEmail" runat="server" Text="EmailAddress"></asp:Label> 
 
    </li> 
 
    <li> 
 
     <i class="fa fa-briefcase user-profile-icon voilet"></i> 
 
     <asp:Label ID="lblcompany" runat="server" Text="Company"></asp:Label> 
 
    </li> 
 
    </ul> 
 
</div> 
 

 
<div class="col-md-6 col-sm-6 col-xs-12"> 
 
    <div class="animated flipInY tile-stats" style="background: #d9534f; color: #ffffff;"> 
 
    <div class="count"> 
 
     <asp:Label ID="lblbalance" runat="server" Text=""></asp:Label> 
 
    </div> 
 
    <p>BALANCE</p> 
 
    </div> 
 

 
    <asp:LinkButton runat="server" ID="btncallme" class="btn btn-success btn-lg" Style="width: 100%;" 
 
            OnClientClick="return confirm('Are you sure you want to Request Call Back?');" 
 
            OnClick="btncallme_Click"> 
 
    <i class="fa fa-mobile m-right-xs"></i> Call Me Back 
 
    </asp:LinkButton> 
 
    <asp:LinkButton runat="server" ID="btnpickup" OnClientClick="return confirm('Are you sure you want to Request Pickup?');" 
 
            class="btn btn-warning btn-lg" Style="width: 100%;" OnClick="btnpickup_Click"> 
 
    <i class="fa fa-rocket m-right-xs"></i> Pickup My Stuff 
 
    </asp:LinkButton> 
 
    <asp:LinkButton runat="server" ID="btnaddbalance" class="btn btn-primary btn-lg" Style="width: 100%;"> 
 
    <i class="fa fa-plus m-right-xs"></i> Add Balance 
 
    </asp:LinkButton> 
 
    <asp:LinkButton runat="server" ID="btneditprofile" class="btn btn-danger btn-lg" Style="width: 100%;"> 
 
    <i class="fa fa-edit m-right-xs"></i>Change Password 
 
    </asp:LinkButton> 
 

 
</div>

我有兩個div我想它的位置來改變基於語言英語/阿拉伯。 如果會話是阿拉伯語Div操作應該在Div Detail之前,反之亦然。

Asp.net

回答

0

這裏是一些服務器端的代碼,可能會解決這個問題,雖然有可能是一個更清潔的方式

  protected void Page_Load(object sender, EventArgs e) 
      { 
       int here = -1; 
       for (int i = 0; i<Request.Headers.Keys.Count; i++) 
       { 
        if (Request.Headers.Keys[i] == "Accept-Language") 
        { 
         here = i; 
        } 
       } 
       if(here > -1) { 
        String lan = Request.Headers[here]; 
        if(lan == "en-US") 
        { 
        // do this 
        } 
        else 
        { 
        // do that 
        } 
       } 
       else { 
        // do a client side solution 
       }