Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8455385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:16:28+00:00 2026-06-10T12:16:28+00:00

I have a listview in which i am binding data from database. i have

  • 0

I have a listview in which i am binding data from database. i have one encrypted column to which we have encrypt while saving to database. now i want to display its decrypted value. but i dont know how to pass that’s value to decrypt method while i am binding the list. My html code is as follow:

<asp:ListView ID="lsttest" runat="server" ItemPlaceholderID="trData" OnItemDataBound="lstRegOrg_ItemDataBound">
                            <LayoutTemplate>
                                <table cellspacing="0" border="0">
                                    <tr class="hdrRowColor1">
                                        <td width="35px" align="left">
                                            &nbsp;S.No
                                        </td>
                                        <td width="175px" align="left">
                                            <asp:LinkButton ID="lnkName" runat="server" CommandArgument="p.FirstName" OnClick="lnk_Sort">Name</asp:LinkButton>
                                            <asp:Image ID="img_lnkName" Visible="false" runat="server" />
                                        </td>
                                        <td width="175px" align="left">
                                            <asp:LinkButton ID="lnk_UserName" runat="server" CommandArgument="p.UserName" OnClick="lnk_Sort">User Name</asp:LinkButton>
                                            <asp:Image ID="img_lnk_UserName" Visible="false" runat="server" />
                                        </td>
                                        <td width="175px" align="left">
                                            <asp:LinkButton ID="lnkEmail" runat="server" CommandArgument="p.EmailAddress" OnClick="lnk_Sort">Email</asp:LinkButton>
                                            <asp:Image ID="img_lnkEmail" Visible="false" runat="server" />
                                        </td>
                                        <td width="120px" align="left">
                                            <asp:LinkButton ID="lnkRoleName" runat="server" CommandArgument="tblroles.RoleName"
                                                OnClick="lnk_Sort">Role</asp:LinkButton>
                                            <asp:Image ID="img_lnkRoleName" Visible="false" runat="server" />
                                        </td>
                                        <td width="150px" align="left">
                                            <asp:LinkButton ID="lnk_CreatedBy" runat="server" CommandArgument="u.firstName" OnClick="lnk_Sort">Created By</asp:LinkButton>
                                            <asp:Image ID="img_lnk_CreatedBy" Visible="false" runat="server" />
                                        </td>
                                        <td width="120px" align="left">
                                            <asp:LinkButton ID="lnkCreatedDate" runat="server" CommandArgument="p.CreatedDate"
                                                OnClick="lnk_Sort">Created Date</asp:LinkButton>
                                            <asp:Image ID="img_lnkCreatedDate" Visible="false" runat="server" />
                                        </td>
                                        <td width="150px" align="left">
                                            <asp:LinkButton ID="lnk_LastModifiedBy" runat="server" CommandArgument="u.firstName"
                                                OnClick="lnk_Sort">Last Modified By</asp:LinkButton>
                                            <asp:Image ID="img_lnk_LastModifiedBy" Visible="false" runat="server" />
                                        </td>
                                        <td width="125px" align="left">
                                            <asp:LinkButton ID="lnk_LastModifiedDate" runat="server" CommandArgument="p.CreatedDate"
                                                OnClick="lnk_Sort">Last Modified On</asp:LinkButton>
                                            <asp:Image ID="img_lnk_LastModifiedDate" Visible="false" runat="server" />
                                        </td>
                                        <td align="center" width="60px">
                                            <asp:LinkButton ID="lnkIsActive" runat="server" CommandArgument="p.IsActive" OnClick="lnk_Sort">IsActive</asp:LinkButton>
                                            <asp:Image ID="img_lnkIsActive" Visible="false" runat="server" />
                                        </td>

                                        <td align="center" width="50px" style="border-right: 1px solid #6398cc">
                                            Actions
                                        </td>
                                    </tr>
                                    <tr id="trData" runat="server">
                                    </tr>
                                </table>
                            </LayoutTemplate>
                            <ItemTemplate>
                                <tr class='<%# Convert.ToBoolean(Container.DataItemIndex % 2) ? "EvenRowColor" : "OddRowColor" %>'>
                                    <td align="left" valign="middle">
                                        &nbsp;<%# Container.DataItemIndex+1 %>.
                                    </td>
                                    <td align="left">
                                        <asp:Label ID="lblFullName" runat="server" Text='<%# Eval("Name")%>'></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:Label ID="Label1" runat="server" Text='<%= CCMMUtility.Decryptdata(Eval("UserName")) %>' />
                                       <%-- <asp:Label ID="Label1" runat="server" Text='<%# Eval("UserName")%>' />--%>
                                    </td>
                                    <td align="left">
                                        <asp:Label ID="lblEmail" runat="server" Text='<%# Eval("EmailAddress")%>'></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:Label ID="lblRole" runat="server" Text='<%# Eval("RoleName") %>'></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:Label ID="Label2" runat="server" Text='<%# Eval("CreatedBy") %>'></asp:Label>
                                    </td>
                                    <td align="left">
                                        &nbsp;<%# Convert.ToDateTime(Eval("CreatedDate")).ToString("MMM, dd yyyy") %>
                                    </td>
                                    <td align="left">
                                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("ModifiedBy") %>'></asp:Label>
                                    </td>
                                    <td align="left">
                                        &nbsp;<%# Convert.ToDateTime(Eval("ModifyDate")).ToString("MMM, dd yyyy")%>
                                    </td>
                                    <td align="center">
                                        <asp:Label ID="lblName" runat="server" Style="display: none;" Text='<%# Eval("Name")%>'></asp:Label>
                                        <asp:Label ID="lbl_Status" runat="server" Style="display: none;" Text='<%# Eval("IsActive")%>'></asp:Label>
                                        <asp:ImageButton ID="imgbtnStatus" runat="server" CommandArgument='<%# Eval("id") %>'
                                            OnClick="imgbtnStatus_Onclick" />
                                    </td>

                                    <td align="center" class="last">
                                        <asp:ImageButton ID="imgbtnEdit" runat="server" ImageUrl="~/App_Themes/ThemeNew/Images/edit.png"
                                            ToolTip="Edit Details" CommandArgument='<%# Eval("Id") %>' OnClick="imgbtnEdit_OnClick" />

                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:ListView>

I want to do it for column Username. Please help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:16:29+00:00Added an answer on June 10, 2026 at 12:16 pm

    You should do

    Text='<%# CCMMUtility.Decryptdata(Eval("UserName")) %>'
    

    instead of

    Text='<%= CCMMUtility.Decryptdata(Eval("UserName")) %>'
    

    Actually # is used to do data binding and = is used to implement simple literal type outputs using some code blocks, So Eval() which is a data binding method would not have any effect inside =.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have ListView which is saving all data to database. For adding i have
I have a listview which is populated by a SimpleCursorAdapter that is binding data
Now I have ListView and in one column has: <GridViewColumn CellTemplateSelector={StaticResource messagerEditorTemplateSelector}/> And everything
I have a listview for which I want to format several fields from a
I have a ListView which displays a list of string values. I want to
I've got a simple ListView which pulls data from an ObservableCollection and I'm using
I have a listview which I have binded (twoWay) to a datatable. The binding
Introduction I have a ListView and want to format only the second column. The
i have a ListView which contains objects bound from an collection. The representation of
I have a WPF ListView which repeats the data vertically. I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.