Hiding a field in a repeater

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JJ297

    Hiding a field in a repeater

    I want to hide the Pin field below in my repeater. How do I do this?

    <asp:Repeater ID="Repeater1" runat="server"
    DataSourceID="S qlDataSource1">

    <ItemTemplate >
    <tr>
    <td><font color="#330099" >Claim SSN: </font><b><%#
    Eval("ClaimSSN" ) %></b></td>
    <td colspan="2"></td>
    <td><font color="#330099" >BIC: </font><b><%# Eval("BIC") %></
    b></td>

    <td colspan="2"></td>

    <td colspan="2"><fo nt color="#330099" >BIC SSN: </font><b><%#
    Eval("BICSSN") %></b></td>

    <tr></tr>
    <td colspan="7"></td>

    <td colspan="7"><fo nt color="#330099" >Status Code: </font><b><
    %# Eval("StatusCod e")%></b></td>

    <td><label runat="server" id="lbl"><font color="#330099" >Pin:
    </font><b><%#Eval ("Pin")%></label></b></tr>
    </ItemTemplate>
    <SeparatorTempl ate>
    <tr>
    <td colspan="100%"> <hr size="1" color=#330099 /><br />

    </td>
    </tr>
    </SeparatorTempla te>
    <FooterTemplate >
    </table>
    </FooterTemplate>
    </asp:Repeater>
  • George Ter-Saakov

    #2
    Re: Hiding a field in a repeater

    By hiding what exactly you mean???

    Do it like <!--<%#Eval("Pin")% >--and it will be hidden in a browser....

    Or how about not to have <%#Eval("Pin")% at all? It will be really hidden
    then :)

    George.


    "JJ297" <nc297@yahoo.co mwrote in message
    news:244d20da-4bd3-4701-9d16-a1d9f9cc5046@p2 5g2000hsf.googl egroups.com...
    >I want to hide the Pin field below in my repeater. How do I do this?
    >
    <asp:Repeater ID="Repeater1" runat="server"
    DataSourceID="S qlDataSource1">
    >
    <ItemTemplate >
    <tr>
    <td><font color="#330099" >Claim SSN: </font><b><%#
    Eval("ClaimSSN" ) %></b></td>
    <td colspan="2"></td>
    <td><font color="#330099" >BIC: </font><b><%# Eval("BIC") %></
    b></td>
    >
    <td colspan="2"></td>
    >
    <td colspan="2"><fo nt color="#330099" >BIC SSN: </font><b><%#
    Eval("BICSSN") %></b></td>
    >
    <tr></tr>
    <td colspan="7"></td>
    >
    <td colspan="7"><fo nt color="#330099" >Status Code: </font><b><
    %# Eval("StatusCod e")%></b></td>
    >
    <td><label runat="server" id="lbl"><font color="#330099" >Pin:
    </font><b><%#Eval ("Pin")%></label></b></tr>
    </ItemTemplate>
    <SeparatorTempl ate>
    <tr>
    <td colspan="100%"> <hr size="1" color=#330099 /><br />
    >
    </td>
    </tr>
    </SeparatorTempla te>
    <FooterTemplate >
    </table>
    </FooterTemplate>
    </asp:Repeater>

    Comment

    • JJ297

      #3
      Re: Hiding a field in a repeater

      On Mar 31, 2:52 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
      By hiding what exactly you mean???
      >
      Do it like <!--<%#Eval("Pin")% >--and it will be hidden in a browser....
      >
      Or how about not to have <%#Eval("Pin")% at all? It will be really hidden
      then :)
      >
      George.
      >
      "JJ297" <nc...@yahoo.co mwrote in message
      >
      news:244d20da-4bd3-4701-9d16-a1d9f9cc5046@p2 5g2000hsf.googl egroups.com...
      >
      >
      >
      I want to hide the Pin field below in my repeater.  How do I do this?
      >
      <asp:Repeater ID="Repeater1" runat="server"
      DataSourceID="S qlDataSource1">
      >
                <ItemTemplate >
             <tr>
             <td><font color="#330099" >Claim SSN: </font><b><%#
      Eval("ClaimSSN" ) %></b></td>
              <td colspan="2"></td>
              <td><font color="#330099" >BIC: </font><b><%# Eval("BIC") %></
      b></td>
      >
              <td colspan="2"></td>
      >
              <td colspan="2"><fo nt color="#330099" >BIC SSN: </font><b><%#
      Eval("BICSSN") %></b></td>
      >
              <tr></tr>
              <td colspan="7"></td>
      >
              <td colspan="7"><fo nt color="#330099" >Status Code: </font><b><
      %# Eval("StatusCod e")%></b></td>
      >
             <td><label runat="server" id="lbl"><font color="#330099" >Pin:
      </font><b><%#Eval ("Pin")%></label></b></tr>
             </ItemTemplate>
           <SeparatorTempl ate>
             <tr>
             <td colspan="100%"> <hr size="1" color=#330099 /><br/>
      >
             </td>
             </tr>
             </SeparatorTempla te>
             <FooterTemplate >
             </table>
             </FooterTemplate>
             </asp:Repeater>- Hide quoted text -
      >
      - Show quoted text -
      I want to put security on the page if the person has manager rights
      they will have the Pin field visible.

      So I will put something like:

      If Session(CSI) = true then

      the pin field is visible

      else

      the pin field in not visible

      I hope that makes sense
      I want the Pin field

      Comment

      • George Ter-Saakov

        #4
        Re: Hiding a field in a repeater

        I see it now....
        The best way to do is following....
        in your code on the page make a function (C# example, but you should not
        have a problem to convert it to VB.NET)

        protected string GetPin(string sPin)
        {
        if( _iLevel 1 )
        return sPin;
        else
        return "******";
        }


        in your aspx page instead of
        <%#Eval("Pin")% >
        have something like
        <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>


        Remember, Eval is the function and you always can create your own
        version.....


        George.








        "JJ297" <nc297@yahoo.co mwrote in message
        news:5f38834d-46c7-45bf-9fb9-8d5c354bf0cf@8g 2000hse.googleg roups.com...
        On Mar 31, 2:52 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
        By hiding what exactly you mean???
        >
        Do it like <!--<%#Eval("Pin")% >--and it will be hidden in a browser....
        >
        Or how about not to have <%#Eval("Pin")% at all? It will be really hidden
        then :)
        >
        George.
        >
        "JJ297" <nc...@yahoo.co mwrote in message
        >
        news:244d20da-4bd3-4701-9d16-a1d9f9cc5046@p2 5g2000hsf.googl egroups.com...
        >
        >
        >
        I want to hide the Pin field below in my repeater. How do I do this?
        >
        <asp:Repeater ID="Repeater1" runat="server"
        DataSourceID="S qlDataSource1">
        >
        <ItemTemplate >
        <tr>
        <td><font color="#330099" >Claim SSN: </font><b><%#
        Eval("ClaimSSN" ) %></b></td>
        <td colspan="2"></td>
        <td><font color="#330099" >BIC: </font><b><%# Eval("BIC") %></
        b></td>
        >
        <td colspan="2"></td>
        >
        <td colspan="2"><fo nt color="#330099" >BIC SSN: </font><b><%#
        Eval("BICSSN") %></b></td>
        >
        <tr></tr>
        <td colspan="7"></td>
        >
        <td colspan="7"><fo nt color="#330099" >Status Code: </font><b><
        %# Eval("StatusCod e")%></b></td>
        >
        <td><label runat="server" id="lbl"><font color="#330099" >Pin:
        </font><b><%#Eval ("Pin")%></label></b></tr>
        </ItemTemplate>
        <SeparatorTempl ate>
        <tr>
        <td colspan="100%"> <hr size="1" color=#330099 /><br />
        >
        </td>
        </tr>
        </SeparatorTempla te>
        <FooterTemplate >
        </table>
        </FooterTemplate>
        </asp:Repeater>- Hide quoted text -
        >
        - Show quoted text -
        I want to put security on the page if the person has manager rights
        they will have the Pin field visible.

        So I will put something like:

        If Session(CSI) = true then

        the pin field is visible

        else

        the pin field in not visible

        I hope that makes sense
        I want the Pin field


        Comment

        • JJ297

          #5
          Re: Hiding a field in a repeater

          On Mar 31, 3:33 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
          I see it now....
          The best way to do is following....
          in your code on the page make a function (C# example, but you should not
          have a problem to convert it to VB.NET)
          >
          protected string GetPin(string sPin)
          {
              if( _iLevel 1 )
                  return sPin;
              else
                  return "******";
          >
          }
          >
          in your aspx page instead of
          <%#Eval("Pin")% >
          have something like
          <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>
          >
          Remember,  Eval is the function and you always can create your own
          version.....
          >
          George.
          >
          "JJ297" <nc...@yahoo.co mwrote in message
          >
          news:5f38834d-46c7-45bf-9fb9-8d5c354bf0cf@8g 2000hse.googleg roups.com...
          On Mar 31, 2:52 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
          >
          >
          >
          >
          >
          By hiding what exactly you mean???
          >
          Do it like <!--<%#Eval("Pin")% >--and it will be hidden in a browser.....
          >
          Or how about not to have <%#Eval("Pin")% at all? It will be really hidden
          then :)
          >
          George.
          >
          "JJ297" <nc...@yahoo.co mwrote in message
          >
          news:244d20da-4bd3-4701-9d16-a1d9f9cc5046@p2 5g2000hsf.googl egroups.com...
          >
          >I want to hide the Pin field below in my repeater. How do I do this?
          >
          <asp:Repeater ID="Repeater1" runat="server"
          DataSourceID="S qlDataSource1">
          >
          <ItemTemplate >
          <tr>
          <td><font color="#330099" >Claim SSN: </font><b><%#
          Eval("ClaimSSN" ) %></b></td>
          <td colspan="2"></td>
          <td><font color="#330099" >BIC: </font><b><%# Eval("BIC") %></
          b></td>
          >
          <td colspan="2"></td>
          >
          <td colspan="2"><fo nt color="#330099" >BIC SSN: </font><b><%#
          Eval("BICSSN") %></b></td>
          >
          <tr></tr>
          <td colspan="7"></td>
          >
          <td colspan="7"><fo nt color="#330099" >Status Code: </font><b><
          %# Eval("StatusCod e")%></b></td>
          >
          <td><label runat="server" id="lbl"><font color="#330099" >Pin:
          </font><b><%#Eval ("Pin")%></label></b></tr>
          </ItemTemplate>
          <SeparatorTempl ate>
          <tr>
          <td colspan="100%"> <hr size="1" color=#330099 /><br />
          >
          </td>
          </tr>
          </SeparatorTempla te>
          <FooterTemplate >
          </table>
          </FooterTemplate>
          </asp:Repeater>- Hide quoted text -
          >
          - Show quoted text -
          >
          I want to put security on the page if the person has manager rights
          they will have the Pin field visible.
          >
          So I will put something like:
          >
          If Session(CSI) = true then
          >
          the pin field is visible
          >
          else
          >
          the pin field in not visible
          >
          I hope that makes sense
          I want the Pin field- Hide quoted text -
          >
          - Show quoted text -
          A little confused... like this:

          Function getPin(ByVal sPin)


          If Session(CSI) = True Then
          Return sPin.visible = False

          End If
          End Function

          Comment

          • George Ter-Saakov

            #6
            Re: Hiding a field in a repeater

            The idea to output to browser Pin or nothing to the user if he does not have
            permissions. It's a little different aproach than just hiding this column
            which is in HTML word might be prefered way.

            so in C# code it will be
            protected string GetPin(string sPin)
            {
            if (Session("CSI") == true)
            return sPin
            else
            return "&nbsp;" //or anything you want
            }


            And on your page you have

            <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>

            This line will call your GetPin for every row and output sPin or &nbsp;
            depends on what is in Session("CSI")




            George.

            "JJ297" <nc297@yahoo.co mwrote in message
            news:912b6291-f5bf-4f98-b54e-f62a70b91706@m7 3g2000hsh.googl egroups.com...
            On Mar 31, 3:33 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
            I see it now....
            The best way to do is following....
            in your code on the page make a function (C# example, but you should not
            have a problem to convert it to VB.NET)
            >
            protected string GetPin(string sPin)
            {
            if( _iLevel 1 )
            return sPin;
            else
            return "******";
            >
            }
            >
            in your aspx page instead of
            <%#Eval("Pin")% >
            have something like
            <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>
            >
            Remember, Eval is the function and you always can create your own
            version.....
            >
            George.
            >
            "JJ297" <nc...@yahoo.co mwrote in message
            >
            news:5f38834d-46c7-45bf-9fb9-8d5c354bf0cf@8g 2000hse.googleg roups.com...
            On Mar 31, 2:52 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
            >
            >
            >
            >
            >
            By hiding what exactly you mean???
            >
            Do it like <!--<%#Eval("Pin")% >--and it will be hidden in a
            browser....
            >
            Or how about not to have <%#Eval("Pin")% at all? It will be really
            hidden
            then :)
            >
            George.
            >
            "JJ297" <nc...@yahoo.co mwrote in message
            >
            news:244d20da-4bd3-4701-9d16-a1d9f9cc5046@p2 5g2000hsf.googl egroups.com...
            >
            >I want to hide the Pin field below in my repeater. How do I do this?
            >
            <asp:Repeater ID="Repeater1" runat="server"
            DataSourceID="S qlDataSource1">
            >
            <ItemTemplate >
            <tr>
            <td><font color="#330099" >Claim SSN: </font><b><%#
            Eval("ClaimSSN" ) %></b></td>
            <td colspan="2"></td>
            <td><font color="#330099" >BIC: </font><b><%# Eval("BIC") %></
            b></td>
            >
            <td colspan="2"></td>
            >
            <td colspan="2"><fo nt color="#330099" >BIC SSN: </font><b><%#
            Eval("BICSSN") %></b></td>
            >
            <tr></tr>
            <td colspan="7"></td>
            >
            <td colspan="7"><fo nt color="#330099" >Status Code: </font><b><
            %# Eval("StatusCod e")%></b></td>
            >
            <td><label runat="server" id="lbl"><font color="#330099" >Pin:
            </font><b><%#Eval ("Pin")%></label></b></tr>
            </ItemTemplate>
            <SeparatorTempl ate>
            <tr>
            <td colspan="100%"> <hr size="1" color=#330099 /><br />
            >
            </td>
            </tr>
            </SeparatorTempla te>
            <FooterTemplate >
            </table>
            </FooterTemplate>
            </asp:Repeater>- Hide quoted text -
            >
            - Show quoted text -
            >
            I want to put security on the page if the person has manager rights
            they will have the Pin field visible.
            >
            So I will put something like:
            >
            If Session(CSI) = true then
            >
            the pin field is visible
            >
            else
            >
            the pin field in not visible
            >
            I hope that makes sense
            I want the Pin field- Hide quoted text -
            >
            - Show quoted text -
            A little confused... like this:

            Function getPin(ByVal sPin)


            If Session(CSI) = True Then
            Return sPin.visible = False

            End If
            End Function


            Comment

            • JJ297

              #7
              Re: Hiding a field in a repeater

              On Apr 1, 7:57 am, "George Ter-Saakov" <gt-...@cardone.com wrote:
              The idea to output to browser Pin or nothing to the user if he does not have
              permissions. It's a little different aproach than just hiding this column
              which is in HTML word might be prefered way.
              >
              so in C# code it will be
              protected string GetPin(string sPin)
              {
                      if (Session("CSI") == true)
                          return sPin
                      else
                          return "&nbsp;" //or anything you want
              >
              }
              >
              And on your page you have
              >
              <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>
              >
              This line will call your GetPin for every row and output sPin or &nbsp;
              depends on what is in Session("CSI")
              >
              George.
              >
              "JJ297" <nc...@yahoo.co mwrote in message
              >
              news:912b6291-f5bf-4f98-b54e-f62a70b91706@m7 3g2000hsh.googl egroups.com...
              On Mar 31, 3:33 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
              >
              >
              >
              >
              >
              I see it now....
              The best way to do is following....
              in your code on the page make a function (C# example, but you should not
              have a problem to convert it to VB.NET)
              >
              protected string GetPin(string sPin)
              {
              if( _iLevel 1 )
              return sPin;
              else
              return "******";
              >
              }
              >
              in your aspx page instead of
              <%#Eval("Pin")% >
              have something like
              <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>
              >
              Remember, Eval is the function and you always can create your own
              version.....
              >
              George.
              >
              "JJ297" <nc...@yahoo.co mwrote in message
              >
              news:5f38834d-46c7-45bf-9fb9-8d5c354bf0cf@8g 2000hse.googleg roups.com...
              On Mar 31, 2:52 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
              >
              By hiding what exactly you mean???
              >
              Do it like <!--<%#Eval("Pin")% >--and it will be hidden in a
              browser....
              >
              Or how about not to have <%#Eval("Pin")% at all? It will be really
              hidden
              then :)
              >
              George.
              >
              "JJ297" <nc...@yahoo.co mwrote in message
              >
              >news:244d20d a-4bd3-4701-9d16-a1d9f9cc5046@p2 5g2000hsf.googl egroups.com....
              >
              I want to hide the Pin field below in my repeater. How do I do this?
              >
              <asp:Repeater ID="Repeater1" runat="server"
              DataSourceID="S qlDataSource1">
              >
              <ItemTemplate >
              <tr>
              <td><font color="#330099" >Claim SSN: </font><b><%#
              Eval("ClaimSSN" ) %></b></td>
              <td colspan="2"></td>
              <td><font color="#330099" >BIC: </font><b><%# Eval("BIC") %></
              b></td>
              >
              <td colspan="2"></td>
              >
              <td colspan="2"><fo nt color="#330099" >BIC SSN: </font><b><%#
              Eval("BICSSN") %></b></td>
              >
              <tr></tr>
              <td colspan="7"></td>
              >
              <td colspan="7"><fo nt color="#330099" >Status Code: </font><b><
              %# Eval("StatusCod e")%></b></td>
              >
              <td><label runat="server" id="lbl"><font color="#330099" >Pin:
              </font><b><%#Eval ("Pin")%></label></b></tr>
              </ItemTemplate>
              <SeparatorTempl ate>
              <tr>
              <td colspan="100%"> <hr size="1" color=#330099 /><br />
              >
              </td>
              </tr>
              </SeparatorTempla te>
              <FooterTemplate >
              </table>
              </FooterTemplate>
              </asp:Repeater>- Hide quoted text -
              >
              - Show quoted text -
              >
              I want to put security on the page if the person has manager rights
              they will have the Pin field visible.
              >
              So I will put something like:
              >
              If Session(CSI) = true then
              >
              the pin field is visible
              >
              else
              >
              the pin field in not visible
              >
              I hope that makes sense
              I want the Pin field- Hide quoted text -
              >
              - Show quoted text -
              >
              A little confused... like this:
              >
              Function getPin(ByVal sPin)
              >
                      If Session(CSI) = True Then
                          Return sPin.visible = False
              >
                      End If
                  End Function- Hide quoted text -
              >
              - Show quoted text -
              Thanks George:

              Here's my function:

              Function getPin(ByVal sPin)


              If Session("SPSLis tings") = True Then
              Return sPin
              Else
              Return "you have no access"

              End If


              End Function

              Then on the aspx page I have this but I'm getting Container is not
              declared. Any suggestions?

              <font color="#330099" >Pin: </font><b><
              %getPin(DataBin der.Eval(Contai ner.DataItem, "Pin"))%></td></b></tr>

              Comment

              • JJ297

                #8
                Re: Hiding a field in a repeater

                On Apr 1, 10:58 am, JJ297 <nc...@yahoo.co mwrote:
                On Apr 1, 7:57 am, "George Ter-Saakov" <gt-...@cardone.com wrote:
                >
                >
                >
                >
                >
                The idea to output to browser Pin or nothing to the user if he does not have
                permissions. It's a little different aproach than just hiding this column
                which is in HTML word might be prefered way.
                >
                so in C# code it will be
                protected string GetPin(string sPin)
                {
                        if (Session("CSI") == true)
                            return sPin
                        else
                            return " " //or anything you want
                >
                }
                >
                And on your page you have
                >
                <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>
                >
                This line will call your GetPin for every row and output sPin or  
                depends on what is in Session("CSI")
                >
                George.
                >
                "JJ297" <nc...@yahoo.co mwrote in message
                >
                news:912b6291-f5bf-4f98-b54e-f62a70b91706@m7 3g2000hsh.googl egroups.com...
                On Mar 31, 3:33 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
                >
                I see it now....
                The best way to do is following....
                in your code on the page make a function (C# example, but you should not
                have a problem to convert it to VB.NET)
                >
                protected string GetPin(string sPin)
                {
                if( _iLevel 1 )
                return sPin;
                else
                return "******";
                >
                }
                >
                in your aspx page instead of
                <%#Eval("Pin")% >
                have something like
                <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>
                >
                Remember, Eval is the function and you always can create your own
                version.....
                >
                George.
                >
                "JJ297" <nc...@yahoo.co mwrote in message
                >
                >news:5f38834 d-46c7-45bf-9fb9-8d5c354bf0cf@8g 2000hse.googleg roups.com...
                On Mar 31, 2:52 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
                >
                By hiding what exactly you mean???
                >
                Do it like <!--<%#Eval("Pin")% >--and it will be hidden in a
                browser....
                >
                Or how about not to have <%#Eval("Pin")% at all? It will be really
                hidden
                then :)
                >
                George.
                >
                "JJ297" <nc...@yahoo.co mwrote in message
                >
                news:244d20da-4bd3-4701-9d16-a1d9f9cc5046@p2 5g2000hsf.googl egroups.com...
                >
                >I want to hide the Pin field below in my repeater. How do I do this?
                >
                <asp:Repeater ID="Repeater1" runat="server"
                DataSourceID="S qlDataSource1">
                >
                <ItemTemplate >
                <tr>
                <td><font color="#330099" >Claim SSN: </font><b><%#
                Eval("ClaimSSN" ) %></b></td>
                <td colspan="2"></td>
                <td><font color="#330099" >BIC: </font><b><%# Eval("BIC") %></
                b></td>
                >
                <td colspan="2"></td>
                >
                <td colspan="2"><fo nt color="#330099" >BIC SSN: </font><b><%#
                Eval("BICSSN") %></b></td>
                >
                <tr></tr>
                <td colspan="7"></td>
                >
                <td colspan="7"><fo nt color="#330099" >Status Code: </font><b><
                %# Eval("StatusCod e")%></b></td>
                >
                <td><label runat="server" id="lbl"><font color="#330099" >Pin:
                </font><b><%#Eval ("Pin")%></label></b></tr>
                </ItemTemplate>
                <SeparatorTempl ate>
                <tr>
                <td colspan="100%"> <hr size="1" color=#330099 /><br />
                >
                </td>
                </tr>
                </SeparatorTempla te>
                <FooterTemplate >
                </table>
                </FooterTemplate>
                </asp:Repeater>- Hide quoted text -
                >
                - Show quoted text -
                >
                I want to put security on the page if the person has manager rights
                they will have the Pin field visible.
                >
                So I will put something like:
                >
                If Session(CSI) = true then
                >
                the pin field is visible
                >
                else
                >
                the pin field in not visible
                >
                I hope that makes sense
                I want the Pin field- Hide quoted text -
                >
                - Show quoted text -
                >
                A little confused... like this:
                >
                Function getPin(ByVal sPin)
                >
                        If Session(CSI) = True Then
                            Return sPin.visible = False
                >
                        End If
                    End Function- Hide quoted text -
                >
                - Show quoted text -
                >
                Thanks George:
                >
                Here's my function:
                >
                 Function getPin(ByVal sPin)
                >
                        If Session("SPSLis tings") = True Then
                            Return sPin
                        Else
                            Return "you have no access"
                >
                        End If
                >
                    End Function
                >
                Then on the aspx page I have this but I'm getting Container is not
                declared.  Any suggestions?
                >
                <font color="#330099" >Pin: </font><b><
                %getPin(DataBin der.Eval(Contai ner.DataItem, "Pin"))%></td></b></tr>- Hide quoted text -
                >
                - Show quoted text -
                George I got it I left out the # in front of the GetPin. Thanks.

                Another question for you. I have this in the function:
                If Session("SPSLis tings") = True Then
                Return sPin
                Else
                Return "you have no access"

                End If

                How can I get rid of the Pin column all together if the user doesn't
                have access instead of returning "You have no Access" Can I make that
                column visiable = false?

                Comment

                • George Ter-Saakov

                  #9
                  Re: Hiding a field in a repeater

                  You can by doing
                  Repeater1.Items[0].Visible = false;
                  It will hide first column in repeater..

                  George,.



                  "JJ297" <nc297@yahoo.co mwrote in message
                  news:c66a0993-83ce-4cb0-9df8-ae4e5c1fe024@z3 8g2000hsc.googl egroups.com...
                  On Apr 1, 10:58 am, JJ297 <nc...@yahoo.co mwrote:
                  On Apr 1, 7:57 am, "George Ter-Saakov" <gt-...@cardone.com wrote:
                  >
                  >
                  >
                  >
                  >
                  The idea to output to browser Pin or nothing to the user if he does not
                  have
                  permissions. It's a little different aproach than just hiding this
                  column
                  which is in HTML word might be prefered way.
                  >
                  so in C# code it will be
                  protected string GetPin(string sPin)
                  {
                  if (Session("CSI") == true)
                  return sPin
                  else
                  return " " //or anything you want
                  >
                  }
                  >
                  And on your page you have
                  >
                  <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>
                  >
                  This line will call your GetPin for every row and output sPin or
                  depends on what is in Session("CSI")
                  >
                  George.
                  >
                  "JJ297" <nc...@yahoo.co mwrote in message
                  >
                  news:912b6291-f5bf-4f98-b54e-f62a70b91706@m7 3g2000hsh.googl egroups.com...
                  On Mar 31, 3:33 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
                  >
                  I see it now....
                  The best way to do is following....
                  in your code on the page make a function (C# example, but you should
                  not
                  have a problem to convert it to VB.NET)
                  >
                  protected string GetPin(string sPin)
                  {
                  if( _iLevel 1 )
                  return sPin;
                  else
                  return "******";
                  >
                  }
                  >
                  in your aspx page instead of
                  <%#Eval("Pin")% >
                  have something like
                  <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>
                  >
                  Remember, Eval is the function and you always can create your own
                  version.....
                  >
                  George.
                  >
                  "JJ297" <nc...@yahoo.co mwrote in message
                  >
                  >news:5f38834 d-46c7-45bf-9fb9-8d5c354bf0cf@8g 2000hse.googleg roups.com...
                  On Mar 31, 2:52 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
                  >
                  By hiding what exactly you mean???
                  >
                  Do it like <!--<%#Eval("Pin")% >--and it will be hidden in a
                  browser....
                  >
                  Or how about not to have <%#Eval("Pin")% at all? It will be really
                  hidden
                  then :)
                  >
                  George.
                  >
                  "JJ297" <nc...@yahoo.co mwrote in message
                  >
                  news:244d20da-4bd3-4701-9d16-a1d9f9cc5046@p2 5g2000hsf.googl egroups.com...
                  >
                  >I want to hide the Pin field below in my repeater. How do I do
                  >this?
                  >
                  <asp:Repeater ID="Repeater1" runat="server"
                  DataSourceID="S qlDataSource1">
                  >
                  <ItemTemplate >
                  <tr>
                  <td><font color="#330099" >Claim SSN: </font><b><%#
                  Eval("ClaimSSN" ) %></b></td>
                  <td colspan="2"></td>
                  <td><font color="#330099" >BIC: </font><b><%# Eval("BIC") %></
                  b></td>
                  >
                  <td colspan="2"></td>
                  >
                  <td colspan="2"><fo nt color="#330099" >BIC SSN: </font><b><%#
                  Eval("BICSSN") %></b></td>
                  >
                  <tr></tr>
                  <td colspan="7"></td>
                  >
                  <td colspan="7"><fo nt color="#330099" >Status Code: </font><b><
                  %# Eval("StatusCod e")%></b></td>
                  >
                  <td><label runat="server" id="lbl"><font color="#330099" >Pin:
                  </font><b><%#Eval ("Pin")%></label></b></tr>
                  </ItemTemplate>
                  <SeparatorTempl ate>
                  <tr>
                  <td colspan="100%"> <hr size="1" color=#330099 /><br />
                  >
                  </td>
                  </tr>
                  </SeparatorTempla te>
                  <FooterTemplate >
                  </table>
                  </FooterTemplate>
                  </asp:Repeater>- Hide quoted text -
                  >
                  - Show quoted text -
                  >
                  I want to put security on the page if the person has manager rights
                  they will have the Pin field visible.
                  >
                  So I will put something like:
                  >
                  If Session(CSI) = true then
                  >
                  the pin field is visible
                  >
                  else
                  >
                  the pin field in not visible
                  >
                  I hope that makes sense
                  I want the Pin field- Hide quoted text -
                  >
                  - Show quoted text -
                  >
                  A little confused... like this:
                  >
                  Function getPin(ByVal sPin)
                  >
                  If Session(CSI) = True Then
                  Return sPin.visible = False
                  >
                  End If
                  End Function- Hide quoted text -
                  >
                  - Show quoted text -
                  >
                  Thanks George:
                  >
                  Here's my function:
                  >
                  Function getPin(ByVal sPin)
                  >
                  If Session("SPSLis tings") = True Then
                  Return sPin
                  Else
                  Return "you have no access"
                  >
                  End If
                  >
                  End Function
                  >
                  Then on the aspx page I have this but I'm getting Container is not
                  declared. Any suggestions?
                  >
                  <font color="#330099" >Pin: </font><b><
                  %getPin(DataBin der.Eval(Contai ner.DataItem, "Pin"))%></td></b></tr>- Hide
                  quoted text -
                  >
                  - Show quoted text -
                  George I got it I left out the # in front of the GetPin. Thanks.

                  Another question for you. I have this in the function:
                  If Session("SPSLis tings") = True Then
                  Return sPin
                  Else
                  Return "you have no access"

                  End If

                  How can I get rid of the Pin column all together if the user doesn't
                  have access instead of returning "You have no Access" Can I make that
                  column visiable = false?


                  Comment

                  • JJ297

                    #10
                    Re: Hiding a field in a repeater

                    On Apr 1, 12:40 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
                    You can by doing
                    Repeater1.Items[0].Visible = false;
                    It will hide first column in repeater..
                    >
                    George,.
                    >
                    "JJ297" <nc...@yahoo.co mwrote in message
                    >
                    news:c66a0993-83ce-4cb0-9df8-ae4e5c1fe024@z3 8g2000hsc.googl egroups.com...
                    On Apr 1, 10:58 am, JJ297 <nc...@yahoo.co mwrote:
                    >
                    >
                    >
                    >
                    >
                    On Apr 1, 7:57 am, "George Ter-Saakov" <gt-...@cardone.com wrote:
                    >
                    The idea to output to browser Pin or nothing to the user if he does not
                    have
                    permissions. It's a little different aproach than just hiding this
                    column
                    which is in HTML word might be prefered way.
                    >
                    so in C# code it will be
                    protected string GetPin(string sPin)
                    {
                    if (Session("CSI") == true)
                    return sPin
                    else
                    return " " //or anything you want
                    >
                    }
                    >
                    And on your page you have
                    >
                    <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>
                    >
                    This line will call your GetPin for every row and output sPin or
                    depends on what is in Session("CSI")
                    >
                    George.
                    >
                    "JJ297" <nc...@yahoo.co mwrote in message
                    >
                    >news:912b629 1-f5bf-4f98-b54e-f62a70b91706@m7 3g2000hsh.googl egroups.com....
                    On Mar 31, 3:33 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
                    >
                    I see it now....
                    The best way to do is following....
                    in your code on the page make a function (C# example, but you should
                    not
                    have a problem to convert it to VB.NET)
                    >
                    protected string GetPin(string sPin)
                    {
                    if( _iLevel 1 )
                    return sPin;
                    else
                    return "******";
                    >
                    }
                    >
                    in your aspx page instead of
                    <%#Eval("Pin")% >
                    have something like
                    <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>
                    >
                    Remember, Eval is the function and you always can create your own
                    version.....
                    >
                    George.
                    >
                    "JJ297" <nc...@yahoo.co mwrote in message
                    >
                    news:5f38834d-46c7-45bf-9fb9-8d5c354bf0cf@8g 2000hse.googleg roups.com....
                    On Mar 31, 2:52 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
                    >
                    By hiding what exactly you mean???
                    >
                    Do it like <!--<%#Eval("Pin")% >--and it will be hidden in a
                    browser....
                    >
                    Or how about not to have <%#Eval("Pin")% at all? It will be really
                    hidden
                    then :)
                    >
                    George.
                    >
                    "JJ297" <nc...@yahoo.co mwrote in message
                    >
                    >news:244d20d a-4bd3-4701-9d16-a1d9f9cc5046@p2 5g2000hsf.googl egroups.com...
                    >
                    I want to hide the Pin field below in my repeater. How do I do
                    this?
                    >
                    <asp:Repeater ID="Repeater1" runat="server"
                    DataSourceID="S qlDataSource1">
                    >
                    <ItemTemplate >
                    <tr>
                    <td><font color="#330099" >Claim SSN: </font><b><%#
                    Eval("ClaimSSN" ) %></b></td>
                    <td colspan="2"></td>
                    <td><font color="#330099" >BIC: </font><b><%# Eval("BIC") %></
                    b></td>
                    >
                    <td colspan="2"></td>
                    >
                    <td colspan="2"><fo nt color="#330099" >BIC SSN: </font><b><%#
                    Eval("BICSSN") %></b></td>
                    >
                    <tr></tr>
                    <td colspan="7"></td>
                    >
                    <td colspan="7"><fo nt color="#330099" >Status Code: </font><b><
                    %# Eval("StatusCod e")%></b></td>
                    >
                    <td><label runat="server" id="lbl"><font color="#330099" >Pin:
                    </font><b><%#Eval ("Pin")%></label></b></tr>
                    </ItemTemplate>
                    <SeparatorTempl ate>
                    <tr>
                    <td colspan="100%"> <hr size="1" color=#330099 /><br />
                    >
                    </td>
                    </tr>
                    </SeparatorTempla te>
                    <FooterTemplate >
                    </table>
                    </FooterTemplate>
                    </asp:Repeater>- Hide quoted text -
                    >
                    - Show quoted text -
                    >
                    I want to put security on the page if the person has manager rights
                    they will have the Pin field visible.
                    >
                    So I will put something like:
                    >
                    If Session(CSI) = true then
                    >
                    the pin field is visible
                    >
                    else
                    >
                    the pin field in not visible
                    >
                    I hope that makes sense
                    I want the Pin field- Hide quoted text -
                    >
                    - Show quoted text -
                    >
                    A little confused... like this:
                    >
                    Function getPin(ByVal sPin)
                    >
                    If Session(CSI) = True Then
                    Return sPin.visible = False
                    >
                    End If
                    End Function- Hide quoted text -
                    >
                    - Show quoted text -
                    >
                    Thanks George:
                    >
                    Here's my function:
                    >
                    Function getPin(ByVal sPin)
                    >
                    If Session("SPSLis tings") = True Then
                    Return sPin
                    Else
                    Return "you have no access"
                    >
                    End If
                    >
                    End Function
                    >
                    Then on the aspx page I have this but I'm getting Container is not
                    declared. Any suggestions?
                    >
                    <font color="#330099" >Pin: </font><b><
                    %getPin(DataBin der.Eval(Contai ner.DataItem, "Pin"))%></td></b></tr>- Hide
                    quoted text -
                    >
                    - Show quoted text -
                    >
                    George I got it I left out the # in front of the GetPin.  Thanks.
                    >
                    Another question for you.  I have this in the function:
                     If Session("SPSLis tings") = True Then
                                Return sPin
                            Else
                                Return "you have no access"
                    >
                            End If
                    >
                    How can I get rid of the Pin column all together if the user doesn't
                    have access instead of returning "You have no Access"  Can I make that
                    column visiable = false?- Hide quoted text -
                    >
                    - Show quoted text -
                    Okay I added this:

                    Function getPin(ByVal sPin)

                    If Session("SPSLis tings") = True Then
                    Return sPin
                    Else
                    Return Repeater1.Items (8).Visible = False

                    End If

                    End Function

                    But now getting this...Index was out of range. Must be non-negative
                    and less than the size of the collection.
                    Parameter name: index

                    Comment

                    • George Ter-Saakov

                      #11
                      Re: Hiding a field in a repeater

                      You are completely confused....
                      chose one method or another.

                      If you just want to hide the column with PIN then in OnLoad event do
                      Repeater1.Items (8).Visible = False
                      (column enumeration starts with 0, so it's 0,1,2,.... So Item(8).Visible =
                      false will hide 9th column)

                      If you want to show something like "no permissions" then go with a getPin
                      method...

                      But you can not do both....

                      George.





                      "JJ297" <nc297@yahoo.co mwrote in message
                      news:27007bc5-8c9b-46ba-a604-64a8f8c4d8d1@y2 1g2000hsf.googl egroups.com...
                      On Apr 1, 12:40 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
                      You can by doing
                      Repeater1.Items[0].Visible = false;
                      It will hide first column in repeater..
                      >
                      George,.
                      >
                      "JJ297" <nc...@yahoo.co mwrote in message
                      >
                      news:c66a0993-83ce-4cb0-9df8-ae4e5c1fe024@z3 8g2000hsc.googl egroups.com...
                      On Apr 1, 10:58 am, JJ297 <nc...@yahoo.co mwrote:
                      >
                      >
                      >
                      >
                      >
                      On Apr 1, 7:57 am, "George Ter-Saakov" <gt-...@cardone.com wrote:
                      >
                      The idea to output to browser Pin or nothing to the user if he does
                      not
                      have
                      permissions. It's a little different aproach than just hiding this
                      column
                      which is in HTML word might be prefered way.
                      >
                      so in C# code it will be
                      protected string GetPin(string sPin)
                      {
                      if (Session("CSI") == true)
                      return sPin
                      else
                      return " " //or anything you want
                      >
                      }
                      >
                      And on your page you have
                      >
                      <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>
                      >
                      This line will call your GetPin for every row and output sPin or
                      depends on what is in Session("CSI")
                      >
                      George.
                      >
                      "JJ297" <nc...@yahoo.co mwrote in message
                      >
                      >news:912b629 1-f5bf-4f98-b54e-f62a70b91706@m7 3g2000hsh.googl egroups.com...
                      On Mar 31, 3:33 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
                      >
                      I see it now....
                      The best way to do is following....
                      in your code on the page make a function (C# example, but you should
                      not
                      have a problem to convert it to VB.NET)
                      >
                      protected string GetPin(string sPin)
                      {
                      if( _iLevel 1 )
                      return sPin;
                      else
                      return "******";
                      >
                      }
                      >
                      in your aspx page instead of
                      <%#Eval("Pin")% >
                      have something like
                      <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>
                      >
                      Remember, Eval is the function and you always can create your own
                      version.....
                      >
                      George.
                      >
                      "JJ297" <nc...@yahoo.co mwrote in message
                      >
                      news:5f38834d-46c7-45bf-9fb9-8d5c354bf0cf@8g 2000hse.googleg roups.com...
                      On Mar 31, 2:52 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
                      >
                      By hiding what exactly you mean???
                      >
                      Do it like <!--<%#Eval("Pin")% >--and it will be hidden in a
                      browser....
                      >
                      Or how about not to have <%#Eval("Pin")% at all? It will be
                      really
                      hidden
                      then :)
                      >
                      George.
                      >
                      "JJ297" <nc...@yahoo.co mwrote in message
                      >
                      >news:244d20d a-4bd3-4701-9d16-a1d9f9cc5046@p2 5g2000hsf.googl egroups.com...
                      >
                      I want to hide the Pin field below in my repeater. How do I do
                      this?
                      >
                      <asp:Repeater ID="Repeater1" runat="server"
                      DataSourceID="S qlDataSource1">
                      >
                      <ItemTemplate >
                      <tr>
                      <td><font color="#330099" >Claim SSN: </font><b><%#
                      Eval("ClaimSSN" ) %></b></td>
                      <td colspan="2"></td>
                      <td><font color="#330099" >BIC: </font><b><%# Eval("BIC") %></
                      b></td>
                      >
                      <td colspan="2"></td>
                      >
                      <td colspan="2"><fo nt color="#330099" >BIC SSN: </font><b><%#
                      Eval("BICSSN") %></b></td>
                      >
                      <tr></tr>
                      <td colspan="7"></td>
                      >
                      <td colspan="7"><fo nt color="#330099" >Status Code: </font><b><
                      %# Eval("StatusCod e")%></b></td>
                      >
                      <td><label runat="server" id="lbl"><font color="#330099" >Pin:
                      </font><b><%#Eval ("Pin")%></label></b></tr>
                      </ItemTemplate>
                      <SeparatorTempl ate>
                      <tr>
                      <td colspan="100%"> <hr size="1" color=#330099 /><br />
                      >
                      </td>
                      </tr>
                      </SeparatorTempla te>
                      <FooterTemplate >
                      </table>
                      </FooterTemplate>
                      </asp:Repeater>- Hide quoted text -
                      >
                      - Show quoted text -
                      >
                      I want to put security on the page if the person has manager rights
                      they will have the Pin field visible.
                      >
                      So I will put something like:
                      >
                      If Session(CSI) = true then
                      >
                      the pin field is visible
                      >
                      else
                      >
                      the pin field in not visible
                      >
                      I hope that makes sense
                      I want the Pin field- Hide quoted text -
                      >
                      - Show quoted text -
                      >
                      A little confused... like this:
                      >
                      Function getPin(ByVal sPin)
                      >
                      If Session(CSI) = True Then
                      Return sPin.visible = False
                      >
                      End If
                      End Function- Hide quoted text -
                      >
                      - Show quoted text -
                      >
                      Thanks George:
                      >
                      Here's my function:
                      >
                      Function getPin(ByVal sPin)
                      >
                      If Session("SPSLis tings") = True Then
                      Return sPin
                      Else
                      Return "you have no access"
                      >
                      End If
                      >
                      End Function
                      >
                      Then on the aspx page I have this but I'm getting Container is not
                      declared. Any suggestions?
                      >
                      <font color="#330099" >Pin: </font><b><
                      %getPin(DataBin der.Eval(Contai ner.DataItem, "Pin"))%></td></b></tr>-
                      Hide
                      quoted text -
                      >
                      - Show quoted text -
                      >
                      George I got it I left out the # in front of the GetPin. Thanks.
                      >
                      Another question for you. I have this in the function:
                      If Session("SPSLis tings") = True Then
                      Return sPin
                      Else
                      Return "you have no access"
                      >
                      End If
                      >
                      How can I get rid of the Pin column all together if the user doesn't
                      have access instead of returning "You have no Access" Can I make that
                      column visiable = false?- Hide quoted text -
                      >
                      - Show quoted text -
                      Okay I added this:

                      Function getPin(ByVal sPin)

                      If Session("SPSLis tings") = True Then
                      Return sPin
                      Else
                      Return Repeater1.Items (8).Visible = False

                      End If

                      End Function

                      But now getting this...Index was out of range. Must be non-negative
                      and less than the size of the collection.
                      Parameter name: index


                      Comment

                      • JJ297

                        #12
                        Re: Hiding a field in a repeater

                        On Apr 2, 10:41 am, "George Ter-Saakov" <gt-...@cardone.com wrote:
                        You are completely confused....
                        chose one method or another.
                        >
                        If you just want to hide the column with PIN then in OnLoad event do
                        Repeater1.Items (8).Visible = False
                        (column enumeration starts with 0, so it's 0,1,2,.... So Item(8).Visible =
                        false will hide 9th column)
                        >
                        If you want to show something like "no permissions" then go with a getPin
                        method...
                        >
                        But you can not do both....
                        >
                        George.
                        >
                        "JJ297" <nc...@yahoo.co mwrote in message
                        >
                        news:27007bc5-8c9b-46ba-a604-64a8f8c4d8d1@y2 1g2000hsf.googl egroups.com...
                        On Apr 1, 12:40 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
                        >
                        >
                        >
                        >
                        >
                        You can by doing
                        Repeater1.Items[0].Visible = false;
                        It will hide first column in repeater..
                        >
                        George,.
                        >
                        "JJ297" <nc...@yahoo.co mwrote in message
                        >
                        news:c66a0993-83ce-4cb0-9df8-ae4e5c1fe024@z3 8g2000hsc.googl egroups.com...
                        On Apr 1, 10:58 am, JJ297 <nc...@yahoo.co mwrote:
                        >
                        On Apr 1, 7:57 am, "George Ter-Saakov" <gt-...@cardone.com wrote:
                        >
                        The idea to output to browser Pin or nothing to the user if he does
                        not
                        have
                        permissions. It's a little different aproach than just hiding this
                        column
                        which is in HTML word might be prefered way.
                        >
                        so in C# code it will be
                        protected string GetPin(string sPin)
                        {
                        if (Session("CSI") == true)
                        return sPin
                        else
                        return " " //or anything you want
                        >
                        }
                        >
                        And on your page you have
                        >
                        <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>
                        >
                        This line will call your GetPin for every row and output sPin or
                        depends on what is in Session("CSI")
                        >
                        George.
                        >
                        "JJ297" <nc...@yahoo.co mwrote in message
                        >
                        news:912b6291-f5bf-4f98-b54e-f62a70b91706@m7 3g2000hsh.googl egroups.com...
                        On Mar 31, 3:33 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
                        >
                        I see it now....
                        The best way to do is following....
                        in your code on the page make a function (C# example, but you should
                        not
                        have a problem to convert it to VB.NET)
                        >
                        protected string GetPin(string sPin)
                        {
                        if( _iLevel 1 )
                        return sPin;
                        else
                        return "******";
                        >
                        }
                        >
                        in your aspx page instead of
                        <%#Eval("Pin")% >
                        have something like
                        <%# GetPin((string) DataBinder.Eval (Container.Data Item, "Pin"))%>
                        >
                        Remember, Eval is the function and you always can create your own
                        version.....
                        >
                        George.
                        >
                        "JJ297" <nc...@yahoo.co mwrote in message
                        >
                        >news:5f38834 d-46c7-45bf-9fb9-8d5c354bf0cf@8g 2000hse.googleg roups.com...
                        On Mar 31, 2:52 pm, "George Ter-Saakov" <gt-...@cardone.com wrote:
                        >
                        By hiding what exactly you mean???
                        >
                        Do it like <!--<%#Eval("Pin")% >--and it will be hidden in a
                        browser....
                        >
                        Or how about not to have <%#Eval("Pin")% at all? It will be
                        really
                        hidden
                        then :)
                        >
                        George.
                        >
                        "JJ297" <nc...@yahoo.co mwrote in message
                        >
                        news:244d20da-4bd3-4701-9d16-a1d9f9cc5046@p2 5g2000hsf.googl egroups.com...
                        >
                        >I want to hide the Pin field below in my repeater. How do I do
                        >this?
                        >
                        <asp:Repeater ID="Repeater1" runat="server"
                        DataSourceID="S qlDataSource1">
                        >
                        <ItemTemplate >
                        <tr>
                        <td><font color="#330099" >Claim SSN: </font><b><%#
                        Eval("ClaimSSN" ) %></b></td>
                        <td colspan="2"></td>
                        <td><font color="#330099" >BIC: </font><b><%# Eval("BIC") %></
                        b></td>
                        >
                        <td colspan="2"></td>
                        >
                        <td colspan="2"><fo nt color="#330099" >BIC SSN: </font><b><%#
                        Eval("BICSSN") %></b></td>
                        >
                        <tr></tr>
                        <td colspan="7"></td>
                        >
                        <td colspan="7"><fo nt color="#330099" >Status Code: </font><b><
                        %# Eval("StatusCod e")%></b></td>
                        >
                        <td><label runat="server" id="lbl"><font color="#330099" >Pin:
                        </font><b><%#Eval ("Pin")%></label></b></tr>
                        </ItemTemplate>
                        <SeparatorTempl ate>
                        <tr>
                        <td colspan="100%"> <hr size="1" color=#330099 /><br />
                        >
                        </td>
                        </tr>
                        </SeparatorTempla te>
                        <FooterTemplate >
                        </table>
                        </FooterTemplate>
                        </asp:Repeater>- Hide quoted text -
                        >
                        - Show quoted text -
                        >
                        I want to put security on the page if the person has manager rights
                        they will have the Pin field visible.
                        >
                        So I will put something like:
                        >
                        If Session(CSI) = true then
                        >
                        the pin field is visible
                        >
                        else
                        >
                        the pin field in not visible
                        >
                        I hope that makes sense
                        I want the Pin field- Hide quoted text -
                        >
                        - Show quoted text -
                        >
                        A little confused... like this:
                        >
                        Function getPin(ByVal sPin)
                        >
                        If Session(CSI) = True Then
                        Return sPin.visible = False
                        >
                        End If
                        End Function- Hide quoted text -
                        >
                        - Show quoted text -
                        >
                        Thanks George:
                        >
                        Here's my function:
                        >
                        Function getPin(ByVal sPin)
                        >
                        If Session("SPSLis tings") = True Then
                        Return sPin
                        Else
                        Return "you have no access"
                        >
                        End If
                        >
                        End Function
                        >
                        Then on the aspx page I have this but I'm getting Container is not
                        declared. Any suggestions?
                        >
                        <font color="#330099" >Pin: </font><b><
                        %getPin(DataBin der.Eval(Contai ner.DataItem, "Pin"))%></td></b></tr>-
                        Hide
                        quoted text -
                        >
                        - Show quoted text -
                        >
                        George I got it I left out the # in front of the GetPin. Thanks.
                        >
                        Another question for you. I have this in the function:
                        If Session("SPSLis tings") = True Then
                        Return sPin
                        Else
                        Return "you have no access"
                        >
                        End If
                        >
                        How can I get rid of the Pin column all together if the user doesn't
                        have access instead of returning "You have no Access" Can I make that
                        column visiable = false?- Hide quoted text -
                        >
                        - Show quoted text -
                        >
                        Okay I added this:
                        >
                         Function getPin(ByVal sPin)
                        >
                                If Session("SPSLis tings") = True Then
                                    Return sPin
                                Else
                                    Return Repeater1.Items (8).Visible = False
                        >
                                End If
                        >
                            End Function
                        >
                        But now getting this...Index was out of range. Must be non-negative
                        and less than the size of the collection.
                        Parameter name: index- Hide quoted text -
                        >
                        - Show quoted text -
                        Okay I got it I need the "no permissions" so I'm going with GetPin.

                        Thanks for all of your help!!!!

                        Comment

                        Working...