自动回邮物业与标签的容器工作 [英] Auto Post back property not working with tab container

查看:248
本文介绍了自动回邮物业与标签的容器工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的酒店管理系统门户网站运用全球化和我坚持一个issue.My问题是,我有一个下拉英文两种语言的列表和西班牙语,我设定的AutoPostBack =true;这样从下拉我选择西班牙语和我的网页通过调用下面

I am applying globalization on my hotel management system web portal and I am stuck with an issue.My issue is that I have a drop down list of two languages English and Spanish and I set autopostback="true" so from drop down I select spanish and my web page successfully convert english language to spanish by calling the method below

 protected override void InitializeCulture()
        {

            if (Request.Form["ctl00$contentplaceholder1$language_drp"] != null)
            {

                UICulture = Request.Form["ctl00$contentplaceholder1$language_drp"];
            }

            base.InitializeCulture();
        }

正如我已经设置AutoPostBack属性true,所以这个函数被调用全成。
而我也从中我可以在西班牙或英文编辑我的酒店详情编辑控件,我已经使用标签容器的酒店的所有信息的。
但是当我点击编辑我的网页亘古不回发到真实的,这就是为什么我不能调用iniliaze培养方法,这就是为什么我在我的网页语言不是可转换。
我申请AutoPostBack属性真正在TabContainer的但未能成功。
在标签的容器我有标签面板。
这里是我的code

As I have set autopostback property true so this function get called successfull. and I have also edit control from which I can edit my hotel details in spanish or in english and I have used tab container for all information's of hotels. but when I click on edit my page doesnot post back to true that is why I am unable to call iniliaze culture method and that is why I my page language is not convertable. I applied autopostback property true in tabcontainer but failed. in tab container I have tab panels. here is my code

<asp:TabContainer ID="TabContainerHotelDetails" runat="server" AutoPostBack="true"  
            Width="100%" OnLoad="TabContainerHotelDetails_Load">
            <asp:TabPanel runat="server"  HeaderText="General" ID="TabGeneral" >
                <ContentTemplate>
                    <asp:Panel ID="PanelInfo" runat="server"  Width="100%" GroupingText="<%$ Resources:Resource, LocalizedInformation %>">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="20%">
                                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="metaHotelName" runat="server" Text="<%$ Resources:Resource, LocalizedHotelName %>"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="metaHotelStatus" runat="server" Text="<%$ Resources:Resource, LocalizedStatus %>"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="metaMemberShip" runat="server" Text="<%$ Resources:Resource, LocalizedMemberShipType %>"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="metaUserName" runat="server" Text="<%$ Resources:Resource, LocalizedUserName %>"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="metaEmail" runat="server" Text="<%$ Resources:Resource, LocalizedEmail %>"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="metaTotalPoint" runat="server" Text="<%$ Resources:Resource, LocalizedTotalPoint %>"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="metaRegistrationDate" runat="server" Text="<%$ Resources:Resource, LocalizedRegisteredDate %>"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="metaLastLogin" runat="server" Text="<%$ Resources:Resource, LocalizedLastLogin %>"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="metaEmailActivated" runat="server" Text="<%$ Resources:Resource, LocalizedEmailActivated %>"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="metaLockedOut" runat="server" Text="<%$ Resources:Resource, LocalizedLockedOut %>"></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td width="5%" style="border-right: 1px dotted black;">
                                </td>
                                <td>
                                    <table border="0" cellpadding="0" cellspacing="0" style="padding-left: 10px;">
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="lblHotelName" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="lblStatus" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="lblMembershipType" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="lblUserName" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="lblEmail" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="lblTotalPoints" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="lblRegisteredDate" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:Label ID="lblLastLogin" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:CheckBox ID="chkEmailActivated" runat="server" OnCheckedChanged="chkEmailActivated_CheckedChanged"
                                                    AutoPostBack="True" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-top: 10px; height: 30px;">
                                                <asp:CheckBox ID="chkLockedOut" runat="server" OnCheckedChanged="chkLockedOut_CheckedChanged"
                                                    AutoPostBack="True" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>

有什么办法,我可以很容易地做到这一点,或替代这一所以以后我点击编辑我iniliazeculture方法被调用。
请帮助,因为我很新的堆栈溢出。我是不知道的能够提出问题的好方法。

Is there any way I can easily do this or alternatives for this so my iniliazeculture method get called after I click on edit. Please help as I am very new to stack overflow. I don't actually know good way to post questions.

推荐答案

在这里,我找到答案后,我搜索了两天。
答案很简单:)

here i found answer after two days of my searching. the answer is very simple :)

设置我的语言来的UICulture值

i set the value of my language to UICulture

protected override void InitializeCulture()
        {
            if (Request.Form["ctl00$contentplaceholder1$language_drp"] != null)
            {

                UICulture = Request.Form["ctl00$contentplaceholder1$language_drp"];
            }
            if (Request.QueryString["HotelID"] != null)
            {

                this.UICulture = "es";
            }
            base.InitializeCulture();
        }

和其优良的工作:)

这篇关于自动回邮物业与标签的容器工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆