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 6831633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:45:37+00:00 2026-05-26T22:45:37+00:00

I am databinding a repeater some text and a datetime(Respond By). <asp:Repeater ID=rptList OnItemDataBound=repeaterDatabound

  • 0

I am databinding a repeater some text and a datetime(Respond By).

<asp:Repeater ID="rptList" OnItemDataBound="repeaterDatabound" runat="server">
     <HeaderTemplate>
     </HeaderTemplate>
     <ItemTemplate>
         <tr>
              <td>
                  <b>Respond By</b>
              </td>
              <td>
                  <%#Eval("RespondBy")%>
              </td>
          </tr>

Here I want to change the datatime before I display it on the screen, I want to do a rowdatabound similar to the one below. How can I do that for a repeater. Or is there anyother way of adding value(3Hrs) to Respond by dateTime before displaying it to users.

   protected void repeaterDatabound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            DateTime.TryParse(Convert.ToString(DataBinder.Eval(e.Row.DataItem, "RespondBy")), out Respond);
        }
    }

I cant add 3hrs in the client side, the no of hours I have to add is different for each users,

  • 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-05-26T22:45:37+00:00Added an answer on May 26, 2026 at 10:45 pm

    You can either do following in aspx file.

     ((DateTime)Eval("RespondBy")).AddHours(3)
    

    Or add a label/literal in aspx instead of <%#Eval("RespondBy")%> and use it in ItemDataBound

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

Sidebar

Related Questions

You can do easily: <asp:Repeater ID=rptCityFriends runat=server OnItemDataBound=rptFriendsContainer_DataBound> <ItemTemplate> <asp:ImageButton ID=imgThumb runat=server PostBackUrl='<%# Eval(FBUsuarioID,~/Friends.aspx?friendID={0})
I have a basic repeater as such: <asp:Repeater id=BlogDisplay runat=server> <HeaderTemplate> <table> </HeaderTemplate> <ItemTemplate>
I have 2 Repeaters one inside another. <div id=result> <asp:Repeater runat=server id=results> <Itemtemplate> <asp:Button
Whether expression databinding(<%# %>) syntax work without a datasource? such as: <asp:TextBox runat=server ID=txt
Im a ASP.NET beginner. I previously asked how to do some databinding to a
I'm working with Databinding in ASP.Net 2.0, and I've come across an issue with
I'm trying to do some WPF databinding, but I'm a little hung up at
Possible Duplicate: Using ASP.NET Controls without databinding My previous question yielded few results so
I have a Repeater in my page and after databinding, I have to click
I have a nested repeater control. Here is what the HTML looks like: <ItemTemplate>

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.