Click here to Skip to main content
15,911,132 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am working on a property dealer site project.when a user login and click on manage properties then there is a button named refresh in datalist (edit itemtemplate field).
I want that when i click on this button the row will refresh and a message show that "Refreshed" and also date should change with the present date.
Please give me suggestions to do it.












Thank You.
Posted

If you mean by refresh that the datalist data displayed in that row must change,then you must use
datalist.DataBind()
method to refresh the datalist.As for the message of refresh,you can add for this button an onclintclick and say for example :

onclientclick="window.alert("refreshed")"


Hope that helps !
 
Share this answer
 
v2
Comments
SURBHI TYAGI 9-Jul-11 5:58am    
no i jst want to change the date of post.the data of datalist remain same
Implement Datalist Item Command event
DataList1_ItemCommand
and in this event bind Datalist again.

Note if you have more than one button in Datalist then provide command for each and check item command event. Like:

protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
{
   if (e.CommandName == "Refresh")
   {
      
   }
}

Thanks,
 
Share this answer
 
v2
Comments
SURBHI TYAGI 9-Jul-11 6:03am    
ok lets try......

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900