[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

06/03/2008 at 08:52AM PDT, ID: 23453631
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.5

Adding meta attribute to asp.table tag

Asked by PHD in Programming for ASP.NET, .NET Framework 2.x, Visual Studio

Tags: asp.net c#

Hello,

I develop an asp.net  2.0 application with visual studio 2005.
I have a webpage with an asp:table named "t_summary". The table contains rows and cells. Cells contain webcontrols like textboxes or labels.

In the code behind of the page, I could reference a textbox like this t_summary.Rows[0].Cells[1].FindControl("l_current_week2").
But since I added the meta tags to globalize the page (meta:resourcekey="MyTableResource1")
the findcontrol method returns null .  When I add  t_summary.Rows[0].Cells[1].Controls.Count to the watch,  it gives me 0.

Someone has an logical explanation ?



1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
Design code :
<asp:Table ID="t_summary" runat="server" EnableTheming="False" CellPadding="0" CellSpacing="0" meta:resourcekey="t_summaryResource1">
                <asp:TableHeaderRow runat="server" meta:resourcekey="TableHeaderRowResource1">
                    <asp:TableHeaderCell runat="server" meta:resourcekey="TableHeaderCellResource1">
                        <asp:LinkButton ID="lb_current_date" ForeColor="Blue" runat="server" OnClick="lb_current_week_Click" meta:resourcekey="lb_current_dateResource1" Text="lb_current_date"></asp:LinkButton>
                    </asp:TableHeaderCell>
                    <asp:TableHeaderCell runat="server" ColumnSpan="9" meta:resourcekey="TableHeaderCellResource2">
                        <asp:ImageButton ID="ib_previous_month" ToolTip="Previous Month" OnClick="ib_previous_month_click" runat="server"
                            ImageUrl="~/images/pager_left_all.gif" meta:resourcekey="ib_previous_monthResource1" />
                        &nbsp;<asp:ImageButton ID="ib_previous_week" ToolTip="Previous Week" runat="server" OnClick="ib_previous_week_Click"
                            ImageUrl="~/images/pager_left.gif" meta:resourcekey="ib_previous_weekResource1" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:Label ID="l_current_week2" runat="server" CssClass="semaine" Width="180px" meta:resourcekey="l_current_week2Resource1" Text="LinkButton"></asp:Label>
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ib_next_week" runat="server" ToolTip="Next Week" OnClick="ib_next_week_Click" ImageUrl="~/images/pager_right.gif" meta:resourcekey="ib_next_weekResource1" />
                        &nbsp;<asp:ImageButton ID="ib_next_month" ToolTip="Next Month" OnClick="ib_next_month_click" runat="server"
                            ImageUrl="~/images/pager_right_all.gif" meta:resourcekey="ib_next_monthResource1" />
                    </asp:TableHeaderCell>
                </asp:TableHeaderRow>
                <asp:TableRow ID="r_header_caption" runat="server"  CssClass="tr_titre" meta:resourcekey="r_header_captionResource1">
                    <asp:TableCell ID="c_activite" Width="186px" RowSpan=2 runat="server" CssClass="apst" meta:resourcekey="c_activiteResource1">
                     <asp:Label ID="Label1" runat="server" Style="vertical-align: top" Text="A" Font-Bold="True"
                            Width="15px" meta:resourcekey="Label1Resource1"></asp:Label><asp:TextBox ID="tb_serch_activite"  Height=15px Width=160px runat="server" meta:resourcekey="tb_serch_activiteResource1"></asp:TextBox><br />
                        <asp:Label ID="Label2" runat="server" Style="vertical-align: top" Text="P" Font-Bold="True"
                            Width="15px" meta:resourcekey="Label2Resource1"></asp:Label>
                        <asp:TextBox ID="tb_search_projet" Width=160px  runat="server"  Height=15px meta:resourcekey="tb_search_projetResource1"
                          ></asp:TextBox><br />
                        <asp:Label ID="Label4" runat="server" Style="vertical-align: top" Text="S" Font-Bold="True"
                            Width="15px" meta:resourcekey="Label4Resource1"></asp:Label>
                        <asp:TextBox ID="tb_dearch_ssprojet" Width=160px  Height=15px runat="server" meta:resourcekey="tb_dearch_ssprojetResource1"
                           ></asp:TextBox>
                    </asp:TableCell>
                     <asp:TableCell ID="c_tache" RowSpan=2 Width="156px" style="vertical-align:top;padding-top:23px" runat="server" ToolTip="T&#226;che" CssClass="apst" meta:resourcekey="c_tacheResource1">
                         <asp:Label ID="Label3" runat="server" Style="vertical-align: top" Text="T" Font-Bold="True"
                            Width="15px" meta:resourcekey="Label3Resource1"></asp:Label> <asp:TextBox ID="tb_search_tache" Width=130px runat="server"  Height=15px meta:resourcekey="tb_search_tacheResource1"></asp:TextBox>
                     <br /><asp:LinkButton text="Search"  ID="lb_search" runat="server" OnClick="search_task" meta:resourcekey="lb_searchResource1" />&nbsp;&nbsp;
                      <asp:LinkButton text="Clear" ID="lb_clear" runat="server" OnClick="clear_search" meta:resourcekey="lb_clearResource1" />
                     </asp:TableCell>
                    <asp:TableCell ID="c_lundi" runat="server" meta:resourcekey="c_lundiResource1" Text="Lundi"></asp:TableCell>
                    <asp:TableCell ID="c_mardi" runat="server" meta:resourcekey="c_mardiResource1" Text="Mardi"></asp:TableCell>
                    <asp:TableCell ID="c_mercredi" runat="server" meta:resourcekey="c_mercrediResource1" Text="Mercredi"></asp:TableCell>
                    <asp:TableCell ID="c_jeudi" runat="server" meta:resourcekey="c_jeudiResource1" Text="Jeudi"></asp:TableCell>
                    <asp:TableCell ID="c_vendredi" runat="server" meta:resourcekey="c_vendrediResource1" Text="Vendredi"></asp:TableCell>
                    <asp:TableCell ID="c_samedi" runat="server" meta:resourcekey="c_samediResource1" Text="Samedi"></asp:TableCell>
                    <asp:TableCell ID="c_dimanche" runat="server" meta:resourcekey="c_dimancheResource1" Text="Dimanche"></asp:TableCell>
                    <asp:TableCell ID="c_total" runat="server" CssClass="apst" ToolTip="Total week." meta:resourcekey="c_totalResource1" Text="Tot."></asp:TableCell>
                </asp:TableRow>
                 <asp:TableRow ID="r_header_sum" runat="server" meta:resourcekey="r_header_sumResource1">
                    <asp:TableCell ID="c_lundi_tot" runat="server" meta:resourcekey="c_lundi_totResource1">
                        <asp:TextBox ID="TextBox4" runat="server" ReadOnly="True" CssClass="encodage_prestation_header_tb" meta:resourcekey="TextBox4Resource1"></asp:TextBox>
                        <asp:HiddenField runat=server ID=h_temp_lundi />
                    </asp:TableCell>
                    <asp:TableCell ID="c_mardi_tot" runat="server" meta:resourcekey="c_mardi_totResource1">
                        <asp:TextBox ID="TextBox6" runat="server" ReadOnly="True" CssClass="encodage_prestation_header_tb" meta:resourcekey="TextBox6Resource1"></asp:TextBox>
                        <asp:HiddenField runat=server ID=h_temp_mardi />
                    </asp:TableCell>                        
                    <asp:TableCell ID="c_mercredi_tot" runat="server" meta:resourcekey="c_mercredi_totResource1">
                        <asp:TextBox ID="TextBox7" runat="server" ReadOnly="True" CssClass="encodage_prestation_header_tb" meta:resourcekey="TextBox7Resource1"></asp:TextBox>
                        <asp:HiddenField runat=server ID=h_temp_mercredi />
                        </asp:TableCell>
                    <asp:TableCell ID="c_jeudi_tot" runat="server" meta:resourcekey="c_jeudi_totResource1">
                        <asp:TextBox ID="TextBox8" runat="server" ReadOnly="True" CssClass="encodage_prestation_header_tb" meta:resourcekey="TextBox8Resource1"></asp:TextBox>
                        <asp:HiddenField runat=server ID=h_temp_jeudi />
                        </asp:TableCell>
                    <asp:TableCell ID="c_vendredi_tot" runat="server" meta:resourcekey="c_vendredi_totResource1">
                        <asp:TextBox ID="TextBox9" runat="server" ReadOnly="True" CssClass="encodage_prestation_header_tb" meta:resourcekey="TextBox9Resource1"></asp:TextBox>
                        <asp:HiddenField runat=server ID=h_temp_vendredi />
                        </asp:TableCell>
                    <asp:TableCell ID="c_samedi_tot" runat="server" meta:resourcekey="c_samedi_totResource1">
                        <asp:TextBox ID="TextBox10" runat="server" ReadOnly="True" CssClass="encodage_prestation_header_tb" meta:resourcekey="TextBox10Resource1"></asp:TextBox>
                        <asp:HiddenField runat=server ID=h_temp_samedi />
                        </asp:TableCell>
                    <asp:TableCell ID="c_dimanche_tot" runat="server" meta:resourcekey="c_dimanche_totResource1">
                        <asp:TextBox ID="TextBox11" runat="server" ReadOnly="True" CssClass="encodage_prestation_header_tb" meta:resourcekey="TextBox11Resource1"></asp:TextBox>
                        <asp:HiddenField runat=server ID=h_temp_dimanche />
                        </asp:TableCell>
                    <asp:TableCell ID="c_total_tot" runat="server" ToolTip="Total week." meta:resourcekey="c_total_totResource1">
                        <asp:TextBox ID="tb_total_week" runat="server" ReadOnly="True" CssClass="encodage_prestation_header_tb" Font-Bold="True" meta:resourcekey="tb_total_weekResource1"></asp:TextBox></asp:TableCell>
                </asp:TableRow>
            </asp:Table>
 
Code behind :
t_summary.Rows[0].Cells[1].FindControl("l_current_week2");
[+][-]06/04/08 06:20 AM, ID: 21709745

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Programming for ASP.NET, .NET Framework 2.x, Visual Studio
Tags: asp.net c#
Sign Up Now!
Solution Provided By: PHD
Participating Experts: 0
Solution Grade: A
 
 
 
Loading Advertisement...
20090824-EE-VQP-74 / EE_QW_2_20070628